mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 08:45:26 -05:00
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
This commit is contained in:
committed by
Takashi Iwai
parent
7fde61795d
commit
7141cb1092
@@ -34,6 +34,7 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
{
|
||||
int sample_width, sample_bytes;
|
||||
u64 pcm_formats = 0;
|
||||
u64 dsd_formats = 0;
|
||||
|
||||
switch (fp->protocol) {
|
||||
case UAC_VERSION_1:
|
||||
@@ -154,7 +155,9 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
fp->iface, fp->altsetting, format);
|
||||
}
|
||||
|
||||
pcm_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
|
||||
dsd_formats |= snd_usb_interface_dsd_format_quirks(chip, fp, sample_bytes);
|
||||
if (dsd_formats && !fp->dsd_dop)
|
||||
pcm_formats = dsd_formats;
|
||||
|
||||
return pcm_formats;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user