* [PATCH] ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets
@ 2021-10-11 14:49 Richard Fitzgerald
2021-10-12 11:45 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2021-10-11 14:49 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, linux-kernel, patches, Stefan Binding, Richard Fitzgerald
From: Stefan Binding <sbinding@opensource.cirrus.com>
Ensure the default 0dB playback path is always used.
The code that set FULL_SCALE_VOL based on LOAD_DET_RCSTAT was
spurious, and resulted in a -6dB attenuation being accidentally
inserted into the playback path.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
sound/soc/codecs/cs42l42.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index d484ec09eb2e..8de23e4732b3 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -922,7 +922,6 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
struct snd_soc_component *component = dai->component;
struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
unsigned int regval;
- u8 fullScaleVol;
int ret;
if (mute) {
@@ -993,20 +992,11 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
cs42l42->stream_use |= 1 << stream;
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Read the headphone load */
- regval = snd_soc_component_read(component, CS42L42_LOAD_DET_RCSTAT);
- if (((regval & CS42L42_RLA_STAT_MASK) >> CS42L42_RLA_STAT_SHIFT) ==
- CS42L42_RLA_STAT_15_OHM) {
- fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK;
- } else {
- fullScaleVol = 0;
- }
-
- /* Un-mute the headphone, set the full scale volume flag */
+ /* Un-mute the headphone */
snd_soc_component_update_bits(component, CS42L42_HP_CTL,
CS42L42_HP_ANA_AMUTE_MASK |
- CS42L42_HP_ANA_BMUTE_MASK |
- CS42L42_HP_FULL_SCALE_VOL_MASK, fullScaleVol);
+ CS42L42_HP_ANA_BMUTE_MASK,
+ 0);
}
}
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets
2021-10-11 14:49 [PATCH] ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets Richard Fitzgerald
@ 2021-10-12 11:45 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-10-12 11:45 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Mark Brown, Stefan Binding, alsa-devel, linux-kernel, patches
On Mon, 11 Oct 2021 15:49:03 +0100, Richard Fitzgerald wrote:
> From: Stefan Binding <sbinding@opensource.cirrus.com>
>
> Ensure the default 0dB playback path is always used.
>
> The code that set FULL_SCALE_VOL based on LOAD_DET_RCSTAT was
> spurious, and resulted in a -6dB attenuation being accidentally
> inserted into the playback path.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets
commit: aa18457c4af7a9dad1f2b150b11beae1d8ab57aa
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-12 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 14:49 [PATCH] ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets Richard Fitzgerald
2021-10-12 11:45 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®