From: Takashi Iwai <tiwai@suse.de>
To: <ismail@ismailbahloul.com>
Cc: "Takashi Iwai" <tiwai@suse.com>,
"Jaroslav Kysela" <perex@perex.cz>, <linux-sound@vger.kernel.org>,
"Stefan Stistrup" <sstistrup@gmail.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] ALSA: usb-audio: Babyface Pro: keep the mixer value out of the index bits
Date: Tue, 01 Dec 2026 07:34:35 +0100 [thread overview]
Message-ID: <87o6b51pc4.wl-tiwai@suse.de> (raw)
In-Reply-To: <179607388314.299107.6947794007730497348@ismailbahloul.com>
On Mon, 30 Nov 2026 22:24:43 +0100,
Ismaïl Bahloul wrote:
>
> [yBewdd] The Babyface Pro mixer controls keep their register index and their
> value in private_value as idx | (val << SND_BBFPRO_MIXER_VAL_SHIFT).
> Commit e9606148a671 added the main outs at index 992 and widened
> SND_BBFPRO_MIXER_IDX_MASK from 0x1ff to 0x3ff, but left the value
> shifted by 9, so bit 0 of the value now lands on bit 9 of the index.
Some strange suffix at the beginning?
> Writing an odd value to a crosspoint (index below 512) therefore sets
> bit 9 of its index: every later write to that control goes to register
> idx + 512 instead, and the control reads back as value | 1, until the
> module is reloaded. alsactl restore of a saved odd value does this at
> every boot. The main outs already have bit 9 set, so they always read
> back odd (an unwritten one reads 1) but keep their register.
>
> Shift the value by 10 bits. The 18-bit value still fits.
>
> Seen on a Babyface Pro FS in class-compliant mode, on 7.3.6, writing 1
> then 32768 to "PCM-AN1-ADAT3 Playback Volume" (index 168). Without
> this patch the second write goes out with wIndex 0x02a8 (index 680)
> and reads back 32769. With it, every write goes to index 168 and
> reads back exactly.
>
> Note for users: a state saved by alsactl on an affected kernel holds
> 1 for any main out that was never written. The old kernel skipped
> restoring it, since the control already read 1. With this fix the
> write goes through and sets that main out to 1/65536 (about -96 dB),
> so those outputs come up nearly silent until the level is set again.
>
> Fixes: e9606148a671 ("ALSA: usb-audio: Add input gain and master output mixer
> elements for RME Babyface Pro")
Don't fold, a Fixes tag should be a single line.
> Cc: stable@vger.kernel.org
> Signed-off-by: Ismaïl Bahloul
Please give the mail address to Signed-off-by line.
> ---
> sound/usb/mixer_quirks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> --- a/sound/usb/mixer_quirks.c
> +++ b/sound/usb/mixer_quirks.c
> @@ -2920,7 +2920,7 @@
> #define SND_BBFPRO_MIXER_MAIN_OUT_CH_OFFSET 992
> #define SND_BBFPRO_MIXER_IDX_MASK 0x3ff
> #define SND_BBFPRO_MIXER_VAL_MASK 0x3ffff
> -#define SND_BBFPRO_MIXER_VAL_SHIFT 9
> +#define SND_BBFPRO_MIXER_VAL_SHIFT 10
> #define SND_BBFPRO_MIXER_VAL_MIN 0 // -inf
> #define SND_BBFPRO_MIXER_VAL_MAX 65536 // +6dB
The patch can't be applied cleanly because the mailer broke
spaces/tabs.
Could you correct the above and resubmit?
thanks,
Takashi
parent reply other threads:[~2026-12-01 6:34 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <179607388314.299107.6947794007730497348@ismailbahloul.com>]
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=87o6b51pc4.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=ismail@ismailbahloul.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sstistrup@gmail.com \
--cc=stable@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.