Commit 8dbd52da authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into fix/asoc

A bunch of small driver specific fixes - nothing terribly exciting here,
all of this will only affect people using particular devices and then
usually only in some use cases.
parents c83f1d7e 1ae5cbc5
...@@ -1405,6 +1405,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec, ...@@ -1405,6 +1405,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_OFF: case SND_SOC_BIAS_OFF:
regcache_cache_only(wm5100->regmap, true); regcache_cache_only(wm5100->regmap, true);
regcache_mark_dirty(wm5100->regmap);
if (wm5100->pdata.ldo_ena) if (wm5100->pdata.ldo_ena)
gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0); gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies), regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
...@@ -2183,6 +2184,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec) ...@@ -2183,6 +2184,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec)
if (wm5100->jack_detecting) { if (wm5100->jack_detecting) {
dev_dbg(codec->dev, "Microphone detected\n"); dev_dbg(codec->dev, "Microphone detected\n");
wm5100->jack_mic = true; wm5100->jack_mic = true;
wm5100->jack_detecting = false;
snd_soc_jack_report(wm5100->jack, snd_soc_jack_report(wm5100->jack,
SND_JACK_HEADSET, SND_JACK_HEADSET,
SND_JACK_HEADSET | SND_JACK_BTN_0); SND_JACK_HEADSET | SND_JACK_BTN_0);
...@@ -2221,6 +2223,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec) ...@@ -2221,6 +2223,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec)
SND_JACK_BTN_0); SND_JACK_BTN_0);
} else if (wm5100->jack_detecting) { } else if (wm5100->jack_detecting) {
dev_dbg(codec->dev, "Headphone detected\n"); dev_dbg(codec->dev, "Headphone detected\n");
wm5100->jack_detecting = false;
snd_soc_jack_report(wm5100->jack, SND_JACK_HEADPHONE, snd_soc_jack_report(wm5100->jack, SND_JACK_HEADPHONE,
SND_JACK_HEADPHONE); SND_JACK_HEADPHONE);
...@@ -2610,6 +2613,13 @@ static const struct regmap_config wm5100_regmap = { ...@@ -2610,6 +2613,13 @@ static const struct regmap_config wm5100_regmap = {
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
static const unsigned int wm5100_mic_ctrl_reg[] = {
WM5100_IN1L_CONTROL,
WM5100_IN2L_CONTROL,
WM5100_IN3L_CONTROL,
WM5100_IN4L_CONTROL,
};
static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -2742,7 +2752,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, ...@@ -2742,7 +2752,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
} }
for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) { for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL, regmap_update_bits(wm5100->regmap, wm5100_mic_ctrl_reg[i],
WM5100_IN1_MODE_MASK | WM5100_IN1_MODE_MASK |
WM5100_IN1_DMIC_SUP_MASK, WM5100_IN1_DMIC_SUP_MASK,
(wm5100->pdata.in_mode[i] << (wm5100->pdata.in_mode[i] <<
......
...@@ -96,7 +96,7 @@ static int wm8962_regulator_event_##n(struct notifier_block *nb, \ ...@@ -96,7 +96,7 @@ static int wm8962_regulator_event_##n(struct notifier_block *nb, \
struct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \ struct wm8962_priv *wm8962 = container_of(nb, struct wm8962_priv, \
disable_nb[n]); \ disable_nb[n]); \
if (event & REGULATOR_EVENT_DISABLE) { \ if (event & REGULATOR_EVENT_DISABLE) { \
regcache_cache_only(wm8962->regmap, true); \ regcache_mark_dirty(wm8962->regmap); \
} \ } \
return 0; \ return 0; \
} }
......
...@@ -108,7 +108,7 @@ static int wm8996_regulator_event_##n(struct notifier_block *nb, \ ...@@ -108,7 +108,7 @@ static int wm8996_regulator_event_##n(struct notifier_block *nb, \
struct wm8996_priv *wm8996 = container_of(nb, struct wm8996_priv, \ struct wm8996_priv *wm8996 = container_of(nb, struct wm8996_priv, \
disable_nb[n]); \ disable_nb[n]); \
if (event & REGULATOR_EVENT_DISABLE) { \ if (event & REGULATOR_EVENT_DISABLE) { \
regcache_cache_only(wm8996->regmap, true); \ regcache_mark_dirty(wm8996->regmap); \
} \ } \
return 0; \ return 0; \
} }
......
...@@ -592,8 +592,8 @@ SOC_DAPM_SINGLE("Output Switch", WM8993_LINE_MIXER2, 0, 1, 0), ...@@ -592,8 +592,8 @@ SOC_DAPM_SINGLE("Output Switch", WM8993_LINE_MIXER2, 0, 1, 0),
}; };
static const struct snd_kcontrol_new line2n_mix[] = { static const struct snd_kcontrol_new line2n_mix[] = {
SOC_DAPM_SINGLE("Left Output Switch", WM8993_LINE_MIXER2, 6, 1, 0), SOC_DAPM_SINGLE("Left Output Switch", WM8993_LINE_MIXER2, 5, 1, 0),
SOC_DAPM_SINGLE("Right Output Switch", WM8993_LINE_MIXER2, 5, 1, 0), SOC_DAPM_SINGLE("Right Output Switch", WM8993_LINE_MIXER2, 6, 1, 0),
}; };
static const struct snd_kcontrol_new line2p_mix[] = { static const struct snd_kcontrol_new line2p_mix[] = {
...@@ -613,6 +613,8 @@ SND_SOC_DAPM_INPUT("IN2RP:VXRP"), ...@@ -613,6 +613,8 @@ SND_SOC_DAPM_INPUT("IN2RP:VXRP"),
SND_SOC_DAPM_SUPPLY("MICBIAS2", WM8993_POWER_MANAGEMENT_1, 5, 0, NULL, 0), SND_SOC_DAPM_SUPPLY("MICBIAS2", WM8993_POWER_MANAGEMENT_1, 5, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("MICBIAS1", WM8993_POWER_MANAGEMENT_1, 4, 0, NULL, 0), SND_SOC_DAPM_SUPPLY("MICBIAS1", WM8993_POWER_MANAGEMENT_1, 4, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("LINEOUT_VMID_BUF", WM8993_ANTIPOP1, 7, 0, NULL, 0),
SND_SOC_DAPM_MIXER("IN1L PGA", WM8993_POWER_MANAGEMENT_2, 6, 0, SND_SOC_DAPM_MIXER("IN1L PGA", WM8993_POWER_MANAGEMENT_2, 6, 0,
in1l_pga, ARRAY_SIZE(in1l_pga)), in1l_pga, ARRAY_SIZE(in1l_pga)),
SND_SOC_DAPM_MIXER("IN1R PGA", WM8993_POWER_MANAGEMENT_2, 4, 0, SND_SOC_DAPM_MIXER("IN1R PGA", WM8993_POWER_MANAGEMENT_2, 4, 0,
...@@ -834,9 +836,11 @@ static const struct snd_soc_dapm_route lineout1_diff_routes[] = { ...@@ -834,9 +836,11 @@ static const struct snd_soc_dapm_route lineout1_diff_routes[] = {
}; };
static const struct snd_soc_dapm_route lineout1_se_routes[] = { static const struct snd_soc_dapm_route lineout1_se_routes[] = {
{ "LINEOUT1N Mixer", NULL, "LINEOUT_VMID_BUF" },
{ "LINEOUT1N Mixer", "Left Output Switch", "Left Output PGA" }, { "LINEOUT1N Mixer", "Left Output Switch", "Left Output PGA" },
{ "LINEOUT1N Mixer", "Right Output Switch", "Right Output PGA" }, { "LINEOUT1N Mixer", "Right Output Switch", "Right Output PGA" },
{ "LINEOUT1P Mixer", NULL, "LINEOUT_VMID_BUF" },
{ "LINEOUT1P Mixer", "Left Output Switch", "Left Output PGA" }, { "LINEOUT1P Mixer", "Left Output Switch", "Left Output PGA" },
{ "LINEOUT1N Driver", NULL, "LINEOUT1N Mixer" }, { "LINEOUT1N Driver", NULL, "LINEOUT1N Mixer" },
...@@ -853,9 +857,11 @@ static const struct snd_soc_dapm_route lineout2_diff_routes[] = { ...@@ -853,9 +857,11 @@ static const struct snd_soc_dapm_route lineout2_diff_routes[] = {
}; };
static const struct snd_soc_dapm_route lineout2_se_routes[] = { static const struct snd_soc_dapm_route lineout2_se_routes[] = {
{ "LINEOUT2N Mixer", NULL, "LINEOUT_VMID_BUF" },
{ "LINEOUT2N Mixer", "Left Output Switch", "Left Output PGA" }, { "LINEOUT2N Mixer", "Left Output Switch", "Left Output PGA" },
{ "LINEOUT2N Mixer", "Right Output Switch", "Right Output PGA" }, { "LINEOUT2N Mixer", "Right Output Switch", "Right Output PGA" },
{ "LINEOUT2P Mixer", NULL, "LINEOUT_VMID_BUF" },
{ "LINEOUT2P Mixer", "Right Output Switch", "Right Output PGA" }, { "LINEOUT2P Mixer", "Right Output Switch", "Right Output PGA" },
{ "LINEOUT2N Driver", NULL, "LINEOUT2N Mixer" }, { "LINEOUT2N Driver", NULL, "LINEOUT2N Mixer" },
......
...@@ -230,8 +230,6 @@ static const struct snd_kcontrol_new neo1973_wm8753_controls[] = { ...@@ -230,8 +230,6 @@ static const struct snd_kcontrol_new neo1973_wm8753_controls[] = {
/* GTA02 specific routes and controls */ /* GTA02 specific routes and controls */
#ifdef CONFIG_MACH_NEO1973_GTA02
static int gta02_speaker_enabled; static int gta02_speaker_enabled;
static int lm4853_set_spk(struct snd_kcontrol *kcontrol, static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
...@@ -311,10 +309,6 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec) ...@@ -311,10 +309,6 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec)
return 0; return 0;
} }
#else
static int neo1973_gta02_wm8753_init(struct snd_soc_code *codec) { return 0; }
#endif
static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
...@@ -322,10 +316,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) ...@@ -322,10 +316,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
int ret; int ret;
/* set up NC codec pins */ /* set up NC codec pins */
if (machine_is_neo1973_gta01()) {
snd_soc_dapm_nc_pin(dapm, "LOUT2");
snd_soc_dapm_nc_pin(dapm, "ROUT2");
}
snd_soc_dapm_nc_pin(dapm, "OUT3"); snd_soc_dapm_nc_pin(dapm, "OUT3");
snd_soc_dapm_nc_pin(dapm, "OUT4"); snd_soc_dapm_nc_pin(dapm, "OUT4");
snd_soc_dapm_nc_pin(dapm, "LINE1"); snd_soc_dapm_nc_pin(dapm, "LINE1");
...@@ -370,50 +360,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) ...@@ -370,50 +360,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
/* GTA01 specific controls */
#ifdef CONFIG_MACH_NEO1973_GTA01
static const struct snd_soc_dapm_route neo1973_lm4857_routes[] = {
{"Amp IN", NULL, "ROUT1"},
{"Amp IN", NULL, "LOUT1"},
{"Handset Spk", NULL, "Amp EP"},
{"Stereo Out", NULL, "Amp LS"},
{"Headphone", NULL, "Amp HP"},
};
static const struct snd_soc_dapm_widget neo1973_lm4857_dapm_widgets[] = {
SND_SOC_DAPM_SPK("Handset Spk", NULL),
SND_SOC_DAPM_SPK("Stereo Out", NULL),
SND_SOC_DAPM_HP("Headphone", NULL),
};
static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm)
{
int ret;
ret = snd_soc_dapm_new_controls(dapm, neo1973_lm4857_dapm_widgets,
ARRAY_SIZE(neo1973_lm4857_dapm_widgets));
if (ret)
return ret;
ret = snd_soc_dapm_add_routes(dapm, neo1973_lm4857_routes,
ARRAY_SIZE(neo1973_lm4857_routes));
if (ret)
return ret;
snd_soc_dapm_ignore_suspend(dapm, "Stereo Out");
snd_soc_dapm_ignore_suspend(dapm, "Handset Spk");
snd_soc_dapm_ignore_suspend(dapm, "Headphone");
return 0;
}
#else
static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; };
#endif
static struct snd_soc_dai_link neo1973_dai[] = { static struct snd_soc_dai_link neo1973_dai[] = {
{ /* Hifi Playback - for similatious use with voice below */ { /* Hifi Playback - for similatious use with voice below */
.name = "WM8753", .name = "WM8753",
...@@ -440,11 +386,6 @@ static struct snd_soc_aux_dev neo1973_aux_devs[] = { ...@@ -440,11 +386,6 @@ static struct snd_soc_aux_dev neo1973_aux_devs[] = {
.name = "dfbmcs320", .name = "dfbmcs320",
.codec_name = "dfbmcs320.0", .codec_name = "dfbmcs320.0",
}, },
{
.name = "lm4857",
.codec_name = "lm4857.0-007c",
.init = neo1973_lm4857_init,
},
}; };
static struct snd_soc_codec_conf neo1973_codec_conf[] = { static struct snd_soc_codec_conf neo1973_codec_conf[] = {
...@@ -454,14 +395,10 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = { ...@@ -454,14 +395,10 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = {
}, },
}; };
#ifdef CONFIG_MACH_NEO1973_GTA02
static const struct gpio neo1973_gta02_gpios[] = { static const struct gpio neo1973_gta02_gpios[] = {
{ GTA02_GPIO_HP_IN, GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" }, { GTA02_GPIO_HP_IN, GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" },
{ GTA02_GPIO_AMP_SHUT, GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" }, { GTA02_GPIO_AMP_SHUT, GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" },
}; };
#else
static const struct gpio neo1973_gta02_gpios[] = {};
#endif
static struct snd_soc_card neo1973 = { static struct snd_soc_card neo1973 = {
.name = "neo1973", .name = "neo1973",
...@@ -480,7 +417,7 @@ static int __init neo1973_init(void) ...@@ -480,7 +417,7 @@ static int __init neo1973_init(void)
{ {
int ret; int ret;
if (!machine_is_neo1973_gta01() && !machine_is_neo1973_gta02()) if (!machine_is_neo1973_gta02())
return -ENODEV; return -ENODEV;
if (machine_is_neo1973_gta02()) { if (machine_is_neo1973_gta02()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment