From: Val Packett <val@packett.cool>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Weidong Wang <wangweidong.a@awinic.com>,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/7] ASoC: codecs: aw88261: make volume control usable
Date: Tue, 19 May 2026 19:36:05 -0300 [thread overview]
Message-ID: <c0ad5424-3348-4b72-9ee3-13c8a050f744@packett.cool> (raw)
In-Reply-To: <97775db6-b417-4e07-962a-f0228684d7e3@sirena.org.uk>
On 5/19/26 1:20 PM, Mark Brown wrote:
> On Mon, May 18, 2026 at 06:44:36PM -0300, Val Packett wrote:
>
>> @@ -424,17 +415,7 @@ static int aw88261_dev_reg_update(struct aw88261 *aw88261,
>> break;
>> }
>>
>> - ret = aw88261_dev_set_vcalb(aw_dev);
>> - if (ret)
>> - return ret;
>> -
>> - if (aw_dev->prof_cur != aw_dev->prof_index)
>> - vol_desc->ctl_volume = 0;
>> -
>> - /* keep min volume */
>> - aw88261_dev_set_volume(aw_dev, vol_desc->mute_volume);
>> -
>> - return ret;
>> + return aw88261_dev_set_vcalb(aw_dev);
>> }
> This looks like it was intentional in order to ensure that things are
> muted until we power up (there's an unmute in _dev_start())?
Sure.. that doesn't seem required but I can keep it to err on the side
of safety / keeping what works.
>> @@ -983,13 +965,13 @@ static int aw88261_volume_set(struct snd_kcontrol *kcontrol,
>> struct aw_volume_desc *vol_desc = &aw88261->aw_pa->volume_desc;
>> struct soc_mixer_control *mc =
>> (struct soc_mixer_control *)kcontrol->private_value;
>> - int value;
>> -
>> - value = ucontrol->value.integer.value[0];
>> + int value = ucontrol->value.integer.value[0];
>>
>> if (value < mc->min || value > mc->max)
>> return -EINVAL;
>>
>> + value = AW88261_MUTE_VOL - (value * 2);
>> +
> We're doing the invert of the value scale before we store it, currently
> the default value is defined as 0 in the header so we'll default to
> maximum volume which is likely to lead to some distress at some point.
> The default should be updated as well.
Ack
~val
next prev parent reply other threads:[~2026-05-19 22:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 21:44 [PATCH v2 0/7] ASoC: codecs: aw88261: fixes and cleanup Val Packett
2026-05-18 21:44 ` [PATCH v2 1/7] ASoC: codecs: aw88261: support changing sample rate and bit width Val Packett
2026-05-18 21:44 ` [PATCH v2 2/7] ASoC: codecs: aw88261: add TDM support Val Packett
2026-05-19 16:06 ` Mark Brown
2026-05-19 22:32 ` Val Packett
2026-05-20 12:18 ` Mark Brown
2026-05-18 21:44 ` [PATCH v2 3/7] ASoC: codecs: aw88261: reduce log spam Val Packett
2026-05-18 21:44 ` [PATCH v2 4/7] ASoC: codecs: aw88261: remove fade in/out on start/stop Val Packett
2026-05-18 21:44 ` [PATCH v2 5/7] ASoC: codecs: aw88261: remove async start Val Packett
2026-05-18 21:44 ` [PATCH v2 6/7] ASoC: codecs: aw88261: fix incorrect masks for boost regs Val Packett
2026-05-18 21:44 ` [PATCH v2 7/7] ASoC: codecs: aw88261: make volume control usable Val Packett
2026-05-19 16:20 ` Mark Brown
2026-05-19 22:36 ` Val Packett [this message]
2026-05-22 12:39 ` Luca Weiss
2026-05-22 12:36 ` [PATCH v2 0/7] ASoC: codecs: aw88261: fixes and cleanup Luca Weiss
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=c0ad5424-3348-4b72-9ee3-13c8a050f744@packett.cool \
--to=val@packett.cool \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phone-devel@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=wangweidong.a@awinic.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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