diff options
| author | Jussi Laako <jussi@sonarnerd.net> | 2025-12-11 18:22:23 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-12-13 12:33:22 +0300 |
| commit | 7141cb1092eb5f30bbb0bcd298e01bbd2c4f0666 (patch) | |
| tree | 80f793a5e08b3a407ac16638bb04c09c098928c1 | |
| parent | 7fde61795df6cbdab90166df33648cc6314fcadd (diff) | |
| download | linux-7141cb1092eb5f30bbb0bcd298e01bbd2c4f0666.tar.xz | |
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
| -rw-r--r-- | sound/usb/format.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c index ec95a063beb1..64cfe4a9d8cd 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -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; } |
