ASoC: arizona: Use component pin control functions
We need to modify the state of some of our own pins and are currently not taking account that the pin name may have a name_prefix applied to it. Replace the snd_soc_dapm_x_pin functions with the equivalent snd_soc_component_x_pin functions so that any name_prefix will be handled automatically. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

کامیت شده توسط
Mark Brown

والد
19a113ae59
کامیت
35f4403edb
@@ -257,6 +257,7 @@ EXPORT_SYMBOL_GPL(arizona_init_mono);
|
||||
int arizona_init_gpio(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
|
||||
struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
|
||||
struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct arizona *arizona = priv->arizona;
|
||||
int i;
|
||||
@@ -264,21 +265,24 @@ int arizona_init_gpio(struct snd_soc_codec *codec)
|
||||
switch (arizona->type) {
|
||||
case WM5110:
|
||||
case WM8280:
|
||||
snd_soc_dapm_disable_pin(dapm, "DRC2 Signal Activity");
|
||||
snd_soc_component_disable_pin(component,
|
||||
"DRC2 Signal Activity");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
snd_soc_dapm_disable_pin(dapm, "DRC1 Signal Activity");
|
||||
snd_soc_component_disable_pin(component, "DRC1 Signal Activity");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(arizona->pdata.gpio_defaults); i++) {
|
||||
switch (arizona->pdata.gpio_defaults[i] & ARIZONA_GPN_FN_MASK) {
|
||||
case ARIZONA_GP_FN_DRC1_SIGNAL_DETECT:
|
||||
snd_soc_dapm_enable_pin(dapm, "DRC1 Signal Activity");
|
||||
snd_soc_component_enable_pin(component,
|
||||
"DRC1 Signal Activity");
|
||||
break;
|
||||
case ARIZONA_GP_FN_DRC2_SIGNAL_DETECT:
|
||||
snd_soc_dapm_enable_pin(dapm, "DRC2 Signal Activity");
|
||||
snd_soc_component_enable_pin(component,
|
||||
"DRC2 Signal Activity");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
مرجع در شماره جدید
Block a user