ALSA: usb-audio: Do not expose PCM and DSD on same altsetting unless DoP

Do not expose DSD altsetting as a PCM one, even if the descriptor claims
it to be PCM instead of special format.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251211152224.1780782-3-jussi@sonarnerd.net

authored by Jussi Laako and committed by Takashi Iwai 7141cb10 7fde6179

+4 -1
+4 -1
sound/usb/format.c
··· 34 { 35 int sample_width, sample_bytes; 36 u64 pcm_formats = 0; 37 38 switch (fp->protocol) { 39 case UAC_VERSION_1: ··· 155 fp->iface, fp->altsetting, format); 156 } 157 158 - pcm_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes); 159 160 return pcm_formats; 161 }
··· 34 { 35 int sample_width, sample_bytes; 36 u64 pcm_formats = 0; 37 + u64 dsd_formats = 0; 38 39 switch (fp->protocol) { 40 case UAC_VERSION_1: ··· 154 fp->iface, fp->altsetting, format); 155 } 156 157 + dsd_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes); 158 + if (dsd_formats && !fp->dsd_dop) 159 + pcm_formats = dsd_formats; 160 161 return pcm_formats; 162 }