Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Add GET_SAMPLE_RATE quirk for C-Media CM6206
Date: Wed, 29 Jul 2026 08:32:03 +0200	[thread overview]
Message-ID: <87pl065msc.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260728222239.62749-1-mikhail.v.gavrilov@gmail.com>

On Wed, 29 Jul 2026 00:22:39 +0200,
Mikhail Gavrilov wrote:
> 
> The C-Media CM6206 (0d8c:0102) truncates the three-byte sample rate it
> returns for UAC_GET_CUR to its two low bytes.  After the rate has been
> set to 96000 (0x017700) the device reports back 30464 (0x007700).
> 
> At probe time the driver initializes every altsetting to its maximum
> rate, so altsetting 5 is set to 96000 and the warning appears on each
> plug-in, before anything has opened the device:
> 
>   usb 3-1.3: 1:5 Set sample rate 96000, clock 0
>   usb 3-1.3: current rate 30464 is different from the runtime rate 96000
> 
> That altsetting is the one parse_audio_format_rates_v1() already fixes
> up for this chip, so this affects every CM6206.
> 
> Only the read-back is broken, the rate itself is applied: a 1 kHz sine
> rendered at 96 kHz is recovered at 1000.2 Hz, and a silent fallback to
> 48000 would have been reported as 0x00bb80 rather than as the low half
> of the requested rate.
> 
> Add a QUIRK_FLAG_GET_SAMPLE_RATE entry for the device so the read-back
> is skipped.  Setting the same flag through the quirk_flags module
> parameter makes the warning disappear while the 96000 init still
> happens.
> 
> Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>

Thanks, applied now.


Takashi

      reply	other threads:[~2026-07-29  6:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 22:22 [PATCH] ALSA: usb-audio: Add GET_SAMPLE_RATE quirk for C-Media CM6206 Mikhail Gavrilov
2026-07-29  6:32 ` Takashi Iwai [this message]

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=87pl065msc.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mikhail.v.gavrilov@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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