mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
ASoC: improve macro definition on TWL4030_OUTPUT_PGA
The @mask is not used in TWL4030_OUTPUT_PGA, so we can remove it and simplify its usage. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://patch.msgid.link/20240821070815.2326534-2-lihongbo22@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
46f2dd5ce5
commit
ac9fc25f11
|
|
@ -555,7 +555,7 @@ static const struct snd_kcontrol_new twl4030_dapm_dbypassv_control =
|
|||
* On unmute: restore the register content from the reg_cache
|
||||
* Outputs handled in this way: Earpiece, PreDrivL/R, CarkitL/R
|
||||
*/
|
||||
#define TWL4030_OUTPUT_PGA(pin_name, reg, mask) \
|
||||
#define TWL4030_OUTPUT_PGA(pin_name, reg) \
|
||||
static int pin_name##pga_event(struct snd_soc_dapm_widget *w, \
|
||||
struct snd_kcontrol *kcontrol, int event) \
|
||||
{ \
|
||||
|
|
@ -575,11 +575,11 @@ static int pin_name##pga_event(struct snd_soc_dapm_widget *w, \
|
|||
return 0; \
|
||||
}
|
||||
|
||||
TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL, TWL4030_EAR_GAIN);
|
||||
TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL, TWL4030_PREDL_GAIN);
|
||||
TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL, TWL4030_PREDR_GAIN);
|
||||
TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL, TWL4030_PRECKL_GAIN);
|
||||
TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL, TWL4030_PRECKR_GAIN);
|
||||
TWL4030_OUTPUT_PGA(earpiece, TWL4030_REG_EAR_CTL);
|
||||
TWL4030_OUTPUT_PGA(predrivel, TWL4030_REG_PREDL_CTL);
|
||||
TWL4030_OUTPUT_PGA(predriver, TWL4030_REG_PREDR_CTL);
|
||||
TWL4030_OUTPUT_PGA(carkitl, TWL4030_REG_PRECKL_CTL);
|
||||
TWL4030_OUTPUT_PGA(carkitr, TWL4030_REG_PRECKR_CTL);
|
||||
|
||||
static void handsfree_ramp(struct snd_soc_component *component, int reg, int ramp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user