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

Commit e3e35f75 authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai
Browse files

ALSA: usb - For class 2 devices, use channel map from altsettings



The channel config from the streaming descriptor is probably a
better indicator of the channel map than the input terminal.
Use the input terminal's channel map as fallback only.

Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0dca01c3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -587,6 +587,7 @@ int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)

			num_channels = as->bNrChannels;
			format = le32_to_cpu(as->bmFormats);
			chconfig = le32_to_cpu(as->bmChannelConfig);

			/* lookup the terminal associated to this interface
			 * to extract the clock */
@@ -594,6 +595,7 @@ int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)
									    as->bTerminalLink);
			if (input_term) {
				clock = input_term->bCSourceID;
				if (!chconfig && (num_channels == input_term->bNrChannels))
					chconfig = le32_to_cpu(input_term->bmChannelConfig);
				break;
			}