mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
alsa: Add associations between jacks, UCM devices and UCM ports
These associations will be used by subsequent UCM jack detection refactoring work.
This commit is contained in:
parent
d7ce78b234
commit
40714b6bcc
4 changed files with 90 additions and 2 deletions
|
|
@ -123,6 +123,7 @@ pa_alsa_jack *pa_alsa_jack_new(pa_alsa_path *path, const char *name, const char
|
|||
|
||||
jack->state_unplugged = PA_AVAILABLE_NO;
|
||||
jack->state_plugged = PA_AVAILABLE_YES;
|
||||
jack->ucm_devices = pa_dynarray_new(NULL);
|
||||
|
||||
return jack;
|
||||
}
|
||||
|
|
@ -130,11 +131,21 @@ pa_alsa_jack *pa_alsa_jack_new(pa_alsa_path *path, const char *name, const char
|
|||
void pa_alsa_jack_free(pa_alsa_jack *jack) {
|
||||
pa_assert(jack);
|
||||
|
||||
if (jack->ucm_devices)
|
||||
pa_dynarray_free(jack->ucm_devices);
|
||||
|
||||
pa_xfree(jack->alsa_name);
|
||||
pa_xfree(jack->name);
|
||||
pa_xfree(jack);
|
||||
}
|
||||
|
||||
void pa_alsa_jack_add_ucm_device(pa_alsa_jack *jack, pa_alsa_ucm_device *device) {
|
||||
pa_assert(jack);
|
||||
pa_assert(device);
|
||||
|
||||
pa_dynarray_append(jack->ucm_devices, device);
|
||||
}
|
||||
|
||||
static const char *lookup_description(const char *key, const struct description_map dm[], unsigned n) {
|
||||
unsigned i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue