alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Hans de Goede <hdegoede@redhat.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	 Mark Brown <broonie@kernel.org>,
	Oder Chiou <oder_chiou@realtek.com>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	Bard Liao <bard.liao@intel.com>
Subject: Re: [PATCH 2/4] ASoC: rt5670: Remove 'HP Playback Switch' control
Date: Tue, 16 Feb 2021 17:35:32 +0100	[thread overview]
Message-ID: <871855cd-8e42-f28e-d15c-01fb8fe3444b@perex.cz> (raw)
In-Reply-To: <294813c9-b417-a632-997d-0b81bad94dbe@redhat.com>

Dne 16. 02. 21 v 16:15 Hans de Goede napsal(a):
> Hi,
> 
> On 2/15/21 7:09 PM, Jaroslav Kysela wrote:
>> Dne 15. 02. 21 v 15:21 Hans de Goede napsal(a):
>>> The RT5670_L_MUTE_SFT and RT5670_R_MUTE_SFT bits (bits 15 and 7) of the
>>> RT5670_HP_VOL register are set / unset by the headphones deplop code
>>> run by rt5670_hp_event() on SND_SOC_DAPM_POST_PMU / SND_SOC_DAPM_PRE_PMD.
>>>
>>> So we should not also export a control to userspace which toggles these
>>> same bits.
>>
>> I think that it may be worth to preserve the full-mute functionality.
>> According the datasheet, the register 0x02 has volume range -46.5dB..12dB.
>> Even the lowest volume may produce an audible output.
>>
>> I would cache the mute switch value in rt5670_priv and update the
>> POST_PMU/PRE_PMD code to use this settings.
> 
> Yes that should work.
> 
> Note though that patch 4/4 adds a mute for the master volume control, even
> though I call it an "emulated" mute it is a full mute, it is just that
> we now have 2 switches, 1 mixer switch and 1 mute switch, which must
> both be true before we enable the path from the DAC through the mixer
> which sits directly behind the "DAC1 Playback Volume" control.
> 
> And we need that mute anyways because the speaker output does not
> have any volume control other then the master "DAC1 Playback Volume"
> which has the same issue of only going very soft and not going to
> a full mute.
> 
> So since we have a working mute in the master volume control, we don't
> really need one for the "HP Playback Volume" control. with that all said,
> your suggestion should work fine.
> 
> So the question is do we want to do as you suggest, or are we happy
> with just having the master mute ?

One hw mute per one hw output should be sufficient. Thank you for the explanation.

					Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

  reply	other threads:[~2021-02-16 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 14:21 [PATCH 0/4] ASoC: rt5670: Various kcontrol fixes Hans de Goede
2021-02-15 14:21 ` [PATCH 1/4] ASoC: rt5670: Remove 'OUT Channel Switch' control Hans de Goede
2021-02-15 14:21 ` [PATCH 2/4] ASoC: rt5670: Remove 'HP Playback " Hans de Goede
2021-02-15 18:09   ` Jaroslav Kysela
2021-02-16 15:15     ` Hans de Goede
2021-02-16 16:35       ` Jaroslav Kysela [this message]
2021-02-15 14:21 ` [PATCH 3/4] ASoC: rt5670: Remove ADC vol-ctrl mute bits poking from Sto1 ADC mixer settings Hans de Goede
2021-02-15 14:21 ` [PATCH 4/4] ASoC: rt5670: Add emulated 'DAC1 Playback Switch' control Hans de Goede
2021-02-24 16:57 ` [PATCH 0/4] ASoC: rt5670: Various kcontrol fixes Mark Brown

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=871855cd-8e42-f28e-d15c-01fb8fe3444b@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --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;
as well as URLs for NNTP newsgroup(s).