Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/tlv320aic32x4', 'asoc/topi…
Browse files Browse the repository at this point in the history
…c/tlv320aic3x', 'asoc/topic/tlv320dac33', 'asoc/topic/ts3a227e' and 'asoc/topic/twl4030' into asoc-next
  • Loading branch information
Mark Brown committed Dec 8, 2014
6 parents 3785083 + f10c0a7 + 68f4383 + 90db15e + 2880fc8 + 3ec8d20 commit 6353a4a
Show file tree
Hide file tree
Showing 10 changed files with 518 additions and 103 deletions.
26 changes: 26 additions & 0 deletions Documentation/devicetree/bindings/sound/ts3a227e.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Texas Instruments TS3A227E
Autonomous Audio Accessory Detection and Configuration Switch

The TS3A227E detect headsets of 3-ring and 4-ring standards and
switches automatically to route the microphone correctly. It also
handles key press detection in accordance with the Android audio
headset specification v1.0.

Required properties:

- compatible: Should contain "ti,ts3a227e".
- reg: The i2c address. Should contain <0x3b>.
- interrupt-parent: The parent interrupt controller
- interrupts: Interrupt number for /INT pin from the 227e


Examples:

i2c {
ts3a227e@3b {
compatible = "ti,ts3a227e";
reg = <0x3b>;
interrupt-parent = <&gpio>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
};
};
5 changes: 5 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_TLV320AIC3X if I2C
select SND_SOC_TPA6130A2 if I2C
select SND_SOC_TLV320DAC33 if I2C
select SND_SOC_TS3A227E if I2C
select SND_SOC_TWL4030 if TWL4030_CORE
select SND_SOC_TWL6040 if TWL6040_CORE
select SND_SOC_UDA134X
Expand Down Expand Up @@ -633,6 +634,10 @@ config SND_SOC_TLV320AIC3X
config SND_SOC_TLV320DAC33
tristate

config SND_SOC_TS3A227E
tristate "TI Headset/Mic detect and keypress chip"
depends on I2C

config SND_SOC_TWL4030
select MFD_TWL4030_AUDIO
tristate
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ snd-soc-tlv320aic31xx-objs := tlv320aic31xx.o
snd-soc-tlv320aic32x4-objs := tlv320aic32x4.o
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
snd-soc-tlv320dac33-objs := tlv320dac33.o
snd-soc-ts3a227e-objs := ts3a227e.o
snd-soc-twl4030-objs := twl4030.o
snd-soc-twl6040-objs := twl6040.o
snd-soc-uda134x-objs := uda134x.o
Expand Down Expand Up @@ -290,6 +291,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC31XX) += snd-soc-tlv320aic31xx.o
obj-$(CONFIG_SND_SOC_TLV320AIC32X4) += snd-soc-tlv320aic32x4.o
obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o
obj-$(CONFIG_SND_SOC_TLV320DAC33) += snd-soc-tlv320dac33.o
obj-$(CONFIG_SND_SOC_TS3A227E) += snd-soc-ts3a227e.o
obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o
obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o
obj-$(CONFIG_SND_SOC_UDA134X) += snd-soc-uda134x.o
Expand Down
24 changes: 1 addition & 23 deletions sound/soc/codecs/tlv320aic32x4.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,18 +597,6 @@ static struct snd_soc_dai_driver aic32x4_dai = {
.symmetric_rates = 1,
};

static int aic32x4_suspend(struct snd_soc_codec *codec)
{
aic32x4_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static int aic32x4_resume(struct snd_soc_codec *codec)
{
aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}

static int aic32x4_probe(struct snd_soc_codec *codec)
{
struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
Expand Down Expand Up @@ -654,8 +642,6 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, AIC32X4_RMICPGANIN,
AIC32X4_RMICPGANIN_CM1R_10K);

aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

/*
* Workaround: for an unknown reason, the ADC needs to be powered up
* and down for the first capture to work properly. It seems related to
Expand All @@ -669,18 +655,10 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
return 0;
}

static int aic32x4_remove(struct snd_soc_codec *codec)
{
aic32x4_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_aic32x4 = {
.probe = aic32x4_probe,
.remove = aic32x4_remove,
.suspend = aic32x4_suspend,
.resume = aic32x4_resume,
.set_bias_level = aic32x4_set_bias_level,
.suspend_bias_off = true,

.controls = aic32x4_snd_controls,
.num_controls = ARRAY_SIZE(aic32x4_snd_controls),
Expand Down
Loading

0 comments on commit 6353a4a

Please sign in to comment.