aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-07 19:08:56 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-07 19:08:56 +0100
commit5a89770daad83df74d77a8d34a1ffaedae565ce9 (patch)
tree0d8ef70293a6ef969ba8b7718e59608337643d40 /sound
parentc46c948260f41af18b277c1eb1895d788d3605dc (diff)
parentaf7c951d76708c61b862463d579d76be757130bf (diff)
Merge branches 'pxa-core' and 'pxa-machines' into pxa-all
Conflicts: arch/arm/mach-pxa/Kconfig arch/arm/mach-pxa/pxa25x.c arch/arm/mach-pxa/pxa27x.c
Diffstat (limited to 'sound')
-rw-r--r--sound/Kconfig4
-rw-r--r--sound/pci/hda/patch_realtek.c24
-rw-r--r--sound/pci/hda/patch_sigmatel.c5
-rw-r--r--sound/pci/oxygen/hifier.c4
-rw-r--r--sound/pci/oxygen/oxygen.c4
-rw-r--r--sound/pci/oxygen/oxygen_mixer.c5
-rw-r--r--sound/soc/omap/n810.c18
-rw-r--r--sound/soc/pxa/corgi.c34
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c40
-rw-r--r--sound/soc/pxa/spitz.c46
10 files changed, 124 insertions, 60 deletions
diff --git a/sound/Kconfig b/sound/Kconfig
index a37bee094eb..8ebf512ced6 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -91,6 +91,9 @@ endif # SOUND_PRIME
endif # !M68K
+endif # SOUND
+
+# AC97_BUS is used from both sound and ucb1400
config AC97_BUS
tristate
help
@@ -99,4 +102,3 @@ config AC97_BUS
sound although they're sharing the AC97 bus. Concerned drivers
should "select" this.
-endif # SOUND
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 909f1c101c9..66025161bd6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6197,7 +6197,6 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG),
SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG),
SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG),
- SND_PCI_QUIRK(0x106b, 0x00a0, "Apple iMac 24''", ALC885_IMAC24),
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG),
SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */
SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
@@ -14067,6 +14066,13 @@ static struct hda_verb alc662_auto_init_verbs[] = {
{ }
};
+/* additional verbs for ALC663 */
+static struct hda_verb alc663_auto_init_verbs[] = {
+ {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+ {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+ { }
+};
+
static struct hda_verb alc663_m51va_init_verbs[] = {
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
{0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -14595,6 +14601,14 @@ static int alc662_auto_create_extra_out(struct alc_spec *spec, hda_nid_t pin,
if (!pin)
return 0;
+ if (pin == 0x17) {
+ /* ALC663 has a mono output pin on 0x17 */
+ sprintf(name, "%s Playback Switch", pfx);
+ err = add_control(spec, ALC_CTL_WIDGET_MUTE, name,
+ HDA_COMPOSE_AMP_VAL(pin, 2, 0, HDA_OUTPUT));
+ return err;
+ }
+
if (alc880_is_fixed_pin(pin)) {
nid = alc880_idx_to_dac(alc880_fixed_pin_idx(pin));
/* printk("DAC nid=%x\n",nid); */
@@ -14765,6 +14779,14 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux;
spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
+ if (codec->vendor_id == 0x10ec0663)
+ spec->init_verbs[spec->num_init_verbs++] =
+ alc663_auto_init_verbs;
+
+ err = alc_auto_add_mic_boost(codec);
+ if (err < 0)
+ return err;
+
spec->mixers[spec->num_mixers] = alc662_capture_mixer;
spec->num_mixers++;
return 1;
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 7fdafcb0015..ad994fcab72 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -560,8 +560,9 @@ static struct hda_verb dell_eq_core_init[] = {
};
static struct hda_verb dell_m6_core_init[] = {
- /* set master volume and direct control */
- { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+ /* set master volume to max value without distortion
+ * and direct control */
+ { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
/* setup audio connections */
{ 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c
index 7442460583d..dad393ae040 100644
--- a/sound/pci/oxygen/hifier.c
+++ b/sound/pci/oxygen/hifier.c
@@ -17,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <linux/delay.h>
#include <linux/pci.h>
#include <sound/control.h>
#include <sound/core.h>
@@ -107,6 +108,9 @@ static void set_ak4396_params(struct oxygen *chip,
else
value |= AK4396_DFS_QUAD;
data->ak4396_ctl2 = value;
+
+ msleep(1); /* wait for the new MCLK to become stable */
+
ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB);
ak4396_write(chip, AK4396_CONTROL_2, value);
ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN);
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 7c8ae31eb46..c5829d30ef8 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -28,6 +28,7 @@
* GPIO 1 -> DFS1 of AK5385
*/
+#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <sound/ac97_codec.h>
@@ -213,6 +214,9 @@ static void set_ak4396_params(struct oxygen *chip,
else
value |= AK4396_DFS_QUAD;
data->ak4396_ctl2 = value;
+
+ msleep(1); /* wait for the new MCLK to become stable */
+
for (i = 0; i < 4; ++i) {
ak4396_write(chip, i,
AK4396_CONTROL_1, AK4396_DIF_24_MSB);
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index 6facac5aed9..05eb8994c14 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -512,9 +512,12 @@ static int ac97_switch_get(struct snd_kcontrol *ctl,
static void mute_ac97_ctl(struct oxygen *chip, unsigned int control)
{
- unsigned int priv_idx = chip->controls[control]->private_value & 0xff;
+ unsigned int priv_idx;
u16 value;
+ if (!chip->controls[control])
+ return;
+ priv_idx = chip->controls[control]->private_value & 0xff;
value = oxygen_read_ac97(chip, 0, priv_idx);
if (!(value & 0x8000)) {
oxygen_write_ac97(chip, 0, priv_idx, value | 0x8000);
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 7694621ec40..87d0ed01f65 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -329,12 +329,14 @@ static int __init n810_soc_init(void)
sys_clkout2_src = clk_get(dev, "sys_clkout2_src");
if (IS_ERR(sys_clkout2_src)) {
dev_err(dev, "Could not get sys_clkout2_src clock\n");
- return -ENODEV;
+ err = PTR_ERR(sys_clkout2_src);
+ goto err2;
}
sys_clkout2 = clk_get(dev, "sys_clkout2");
if (IS_ERR(sys_clkout2)) {
dev_err(dev, "Could not get sys_clkout2\n");
- goto err1;
+ err = PTR_ERR(sys_clkout2);
+ goto err3;
}
/*
* Configure 12 MHz output on SYS_CLKOUT2. Therefore we must use
@@ -343,7 +345,8 @@ static int __init n810_soc_init(void)
func96m_clk = clk_get(dev, "func_96m_ck");
if (IS_ERR(func96m_clk)) {
dev_err(dev, "Could not get func 96M clock\n");
- goto err2;
+ err = PTR_ERR(func96m_clk);
+ goto err4;
}
clk_set_parent(sys_clkout2_src, func96m_clk);
clk_set_rate(sys_clkout2, 12000000);
@@ -356,20 +359,25 @@ static int __init n810_soc_init(void)
gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);
return 0;
-err2:
+err4:
clk_put(sys_clkout2);
+err3:
+ clk_put(sys_clkout2_src);
+err2:
platform_device_del(n810_snd_device);
err1:
platform_device_put(n810_snd_device);
return err;
-
}
static void __exit n810_soc_exit(void)
{
gpio_free(N810_SPEAKER_AMP_GPIO);
gpio_free(N810_HEADSET_AMP_GPIO);
+ clk_put(sys_clkout2_src);
+ clk_put(sys_clkout2);
+ clk_put(func96m_clk);
platform_device_unregister(n810_snd_device);
}
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index 0a53f72077f..fa69faa886e 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -18,13 +18,13 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <asm/mach-types.h>
-#include <asm/hardware/scoop.h>
#include <mach/pxa-regs.h>
#include <mach/hardware.h>
#include <mach/corgi.h>
@@ -54,8 +54,8 @@ static void corgi_ext_control(struct snd_soc_codec *codec)
switch (corgi_jack_func) {
case CORGI_HP:
/* set = unmute headphone */
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+ gpio_set_value(CORGI_GPIO_MUTE_L, 1);
+ gpio_set_value(CORGI_GPIO_MUTE_R, 1);
snd_soc_dapm_disable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_enable_pin(codec, "Headphone Jack");
@@ -63,24 +63,24 @@ static void corgi_ext_control(struct snd_soc_codec *codec)
break;
case CORGI_MIC:
/* reset = mute headphone */
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+ gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+ gpio_set_value(CORGI_GPIO_MUTE_R, 0);
snd_soc_dapm_enable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_disable_pin(codec, "Headphone Jack");
snd_soc_dapm_disable_pin(codec, "Headset Jack");
break;
case CORGI_LINE:
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+ gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+ gpio_set_value(CORGI_GPIO_MUTE_R, 0);
snd_soc_dapm_disable_pin(codec, "Mic Jack");
snd_soc_dapm_enable_pin(codec, "Line Jack");
snd_soc_dapm_disable_pin(codec, "Headphone Jack");
snd_soc_dapm_disable_pin(codec, "Headset Jack");
break;
case CORGI_HEADSET:
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+ gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+ gpio_set_value(CORGI_GPIO_MUTE_R, 1);
snd_soc_dapm_enable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_disable_pin(codec, "Headphone Jack");
@@ -114,8 +114,8 @@ static int corgi_shutdown(struct snd_pcm_substream *substream)
struct snd_soc_codec *codec = rtd->socdev->codec;
/* set = unmute headphone */
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+ gpio_set_value(CORGI_GPIO_MUTE_L, 1);
+ gpio_set_value(CORGI_GPIO_MUTE_R, 1);
return 0;
}
@@ -218,22 +218,14 @@ static int corgi_set_spk(struct snd_kcontrol *kcontrol,
static int corgi_amp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
- if (SND_SOC_DAPM_EVENT_ON(event))
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
- else
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
-
+ gpio_set_value(CORGI_GPIO_APM_ON, SND_SOC_DAPM_EVENT_ON(event));
return 0;
}
static int corgi_mic_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
- if (SND_SOC_DAPM_EVENT_ON(event))
- set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MIC_BIAS);
- else
- reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MIC_BIAS);
-
+ gpio_set_value(CORGI_GPIO_MIC_BIAS, SND_SOC_DAPM_EVENT_ON(event));
return 0;
}
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 8548818eea0..c796b188277 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -16,6 +16,7 @@
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
+#include <linux/platform_device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/initval.h>
@@ -81,7 +82,6 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
- clk_i2s = clk_get(NULL, "I2SCLK");
if (IS_ERR(clk_i2s))
return PTR_ERR(clk_i2s);
@@ -152,6 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
+ BUG_ON(IS_ERR(clk_i2s));
clk_enable(clk_i2s);
pxa_i2s_wait();
@@ -317,6 +318,43 @@ struct snd_soc_dai pxa_i2s_dai = {
EXPORT_SYMBOL_GPL(pxa_i2s_dai);
+static int pxa2xx_i2s_probe(struct platform_device *dev)
+{
+ clk_i2s = clk_get(&dev->dev, "I2SCLK");
+ return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0;
+}
+
+static int __devexit pxa2xx_i2s_remove(struct platform_device *dev)
+{
+ clk_put(clk_i2s);
+ clk_i2s = ERR_PTR(-ENOENT);
+ return 0;
+}
+
+static struct platform_driver pxa2xx_i2s_driver = {
+ .probe = pxa2xx_i2s_probe,
+ .remove = __devexit_p(pxa2xx_i2s_remove),
+
+ .driver = {
+ .name = "pxa2xx-i2s",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init pxa2xx_i2s_init(void)
+{
+ clk_i2s = ERR_PTR(-ENOENT);
+ return platform_driver_register(&pxa2xx_i2s_driver);
+}
+
+static void __exit pxa2xx_i2s_exit(void)
+{
+ platform_driver_unregister(&pxa2xx_i2s_driver);
+}
+
+module_init(pxa2xx_i2s_init);
+module_exit(pxa2xx_i2s_exit);
+
/* Module information */
MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
MODULE_DESCRIPTION("pxa2xx I2S SoC Interface");
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 37cb768fc93..b89a3edd218 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -19,16 +19,15 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <asm/mach-types.h>
-#include <asm/hardware/scoop.h>
#include <mach/pxa-regs.h>
#include <mach/hardware.h>
-#include <mach/akita.h>
#include <mach/spitz.h>
#include "../codecs/wm8750.h"
#include "pxa2xx-pcm.h"
@@ -63,8 +62,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
snd_soc_dapm_disable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_enable_pin(codec, "Headphone Jack");
- set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
- set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+ gpio_set_value(SPITZ_GPIO_MUTE_L, 1);
+ gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
break;
case SPITZ_MIC:
/* enable mic jack and bias, mute hp */
@@ -72,8 +71,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
snd_soc_dapm_disable_pin(codec, "Headset Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_enable_pin(codec, "Mic Jack");
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+ gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+ gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
break;
case SPITZ_LINE:
/* enable line jack, disable mic bias and mute hp */
@@ -81,8 +80,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
snd_soc_dapm_disable_pin(codec, "Headset Jack");
snd_soc_dapm_disable_pin(codec, "Mic Jack");
snd_soc_dapm_enable_pin(codec, "Line Jack");
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+ gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+ gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
break;
case SPITZ_HEADSET:
/* enable and unmute headset jack enable mic bias, mute L hp */
@@ -90,8 +89,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
snd_soc_dapm_enable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
snd_soc_dapm_enable_pin(codec, "Headset Jack");
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
- set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+ gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+ gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
break;
case SPITZ_HP_OFF:
@@ -100,8 +99,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
snd_soc_dapm_disable_pin(codec, "Headset Jack");
snd_soc_dapm_disable_pin(codec, "Mic Jack");
snd_soc_dapm_disable_pin(codec, "Line Jack");
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+ gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+ gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
break;
}
snd_soc_dapm_sync(codec);
@@ -215,23 +214,14 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol,
static int spitz_mic_bias(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
- if (machine_is_borzoi() || machine_is_spitz()) {
- if (SND_SOC_DAPM_EVENT_ON(event))
- set_scoop_gpio(&spitzscoop2_device.dev,
- SPITZ_SCP2_MIC_BIAS);
- else
- reset_scoop_gpio(&spitzscoop2_device.dev,
- SPITZ_SCP2_MIC_BIAS);
- }
+ if (machine_is_borzoi() || machine_is_spitz())
+ gpio_set_value(SPITZ_GPIO_MIC_BIAS,
+ SND_SOC_DAPM_EVENT_ON(event));
+
+ if (machine_is_akita())
+ gpio_set_value(AKITA_GPIO_MIC_BIAS,
+ SND_SOC_DAPM_EVENT_ON(event));
- if (machine_is_akita()) {
- if (SND_SOC_DAPM_EVENT_ON(event))
- akita_set_ioexp(&akitaioexp_device.dev,
- AKITA_IOEXP_MIC_BIAS);
- else
- akita_reset_ioexp(&akitaioexp_device.dev,
- AKITA_IOEXP_MIC_BIAS);
- }
return 0;
}