alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jussi Laako <jussi@sonarnerd.net>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, Jussi Laako <jussi@sonarnerd.net>
Subject: [PATCH 3/3] ALSA: usb-audio: Do not expose PCM and DSD on same altsetting unless DoP
Date: Thu, 11 Dec 2025 17:22:23 +0200	[thread overview]
Message-ID: <20251211152224.1780782-3-jussi@sonarnerd.net> (raw)
In-Reply-To: <20251211152224.1780782-1-jussi@sonarnerd.net>

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>
---
 sound/usb/format.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
 }
-- 
2.43.0


  parent reply	other threads:[~2025-12-11 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11 15:22 [PATCH 1/3] ALSA: usb-audio: Update for native DSD support quirks Jussi Laako
2025-12-11 15:22 ` [PATCH 2/3] ALSA: usb-audio: Reorder USB mode selection quirk Jussi Laako
2025-12-11 15:22 ` Jussi Laako [this message]
2025-12-13  9:33 ` [PATCH 1/3] ALSA: usb-audio: Update for native DSD support quirks Takashi Iwai
2025-12-17  2:04 ` otiscavin3

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251211152224.1780782-3-jussi@sonarnerd.net \
    --to=jussi@sonarnerd.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).