Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71066945 authored by Jorge Sanjuan's avatar Jorge Sanjuan Committed by Takashi Iwai
Browse files

ALSA: usb-audio: UAC3: Parse Input Terminal number of channels.



Obtain the number of channels for the Input Terminal from the
Logical Cluster Descriptor. This achieves a useful minimal parsing
of this unit so it can be used in other units in the topology.

Signed-off-by: default avatarJorge Sanjuan <jorge.sanjuan@codethink.co.uk>
Reviewed-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
Tested-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1d38f5d8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -902,8 +902,12 @@ static int check_input_term(struct mixer_build *state, int id,
				term->id = id;
				term->type = le16_to_cpu(d->wTerminalType);

				/* REVISIT: UAC3 IT doesn't have channels/cfg */
				term->channels = 0;
				err = get_cluster_channels_v3(state, le16_to_cpu(d->wClusterDescrID));
				if (err < 0)
					return err;
				term->channels = err;

				/* REVISIT: UAC3 IT doesn't have channels cfg */
				term->chconfig = 0;

				term->name = le16_to_cpu(d->wTerminalDescrStr);