Skip to content

Commit

Permalink
Merge tag 'asoc-v3.15-2' into asoc-linus
Browse files Browse the repository at this point in the history
ASoC: Updates for v3.15

This is mostly a few additional fixes from Lars-Peter, a new driver and
cleaning up a git failure with merging the Intel branch (combined with
an xargs failure to pay attention to error codes).  The history lists a
bunch of additional commits for the branch but the content of those
commits is actually present already but not recorded in history due to
git failing.  Unfortunately xargs is used in the merge script and it
doesn't do a good job of noticing errors from the commands it invokes.

# gpg: Signature made Thu 13 Mar 2014 14:25:44 GMT using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <[email protected]>"
# gpg:                 aka "Mark Brown <[email protected]>"
# gpg:                 aka "Mark Brown <[email protected]>"
# gpg:                 aka "Mark Brown <[email protected]>"
# gpg:                 aka "Mark Brown <[email protected]>"
# gpg:                 aka "Mark Brown <[email protected]>"
  • Loading branch information
broonie committed Apr 8, 2014
2 parents 30b58f2 + 56fe489 commit f7cf71e
Show file tree
Hide file tree
Showing 109 changed files with 1,958 additions and 795 deletions.
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/sound/armada-370db-audio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Device Tree bindings for the Armada 370 DB audio
================================================

These Device Tree bindings are used to describe the audio complex
found on the Armada 370 DB platform.

Mandatory properties:

* compatible: must be "marvell,a370db-audio"

* marvell,audio-controller: a phandle that points to the audio
controller of the Armada 370 SoC.

* marvell,audio-codec: a phandle that points to the analog audio
codec connected to the Armada 370 SoC.

Example:

sound {
compatible = "marvell,a370db-audio";
marvell,audio-controller = <&audio_controller>;
marvell,audio-codec = <&audio_codec>;
status = "okay";
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/sound/mvebu-audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Required properties:
- compatible:
"marvell,kirkwood-audio" for Kirkwood platforms
"marvell,dove-audio" for Dove platforms
"marvell,armada370-audio" for Armada 370 platforms

- reg: physical base address of the controller and length of memory mapped
region.
Expand Down
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Texas Instruments - tlv320aic31xx Codec module

The tlv320aic31xx serial control bus communicates through I2C protocols

Required properties:

- compatible - "string" - One of:
"ti,tlv320aic310x" - Generic TLV320AIC31xx with mono speaker amp
"ti,tlv320aic311x" - Generic TLV320AIC31xx with stereo speaker amp
"ti,tlv320aic3100" - TLV320AIC3100 (mono speaker amp, no MiniDSP)
"ti,tlv320aic3110" - TLV320AIC3110 (stereo speaker amp, no MiniDSP)
"ti,tlv320aic3120" - TLV320AIC3120 (mono speaker amp, MiniDSP)
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP)

- reg - <int> - I2C slave address


Optional properties:

- gpio-reset - gpio pin number used for codec reset
- ai31xx-micbias-vg - MicBias Voltage setting
1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V
2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
If this node is not mentioned or if the value is unknown, then
micbias is set to 2.0V.
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
DVDD-supply : power supplies for the device as covered in
Documentation/devicetree/bindings/regulator/regulator.txt

CODEC output pins:
* HPL
* HPR
* SPL, devices with stereo speaker amp
* SPR, devices with stereo speaker amp
* SPK, devices with mono speaker amp
* MICBIAS

CODEC input pins:
* MIC1LP
* MIC1RP
* MIC1LM

The pins can be used in referring sound node's audio-routing property.

Example:
#include <dt-bindings/sound/tlv320aic31xx-micbias.h>

tlv320aic31xx: tlv320aic31xx@18 {
compatible = "ti,tlv320aic311x";
reg = <0x18>;

ai31xx-micbias-vg = <MICBIAS_OFF>;

HPVDD-supply = <&regulator>;
SPRVDD-supply = <&regulator>;
SPLVDD-supply = <&regulator>;
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
};
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,13 @@ L: [email protected] (moderated for non-subscribers)
S: Odd Fixes
F: sound/soc/codecs/cs4270*

CIRRUS LOGIC AUDIO CODEC DRIVERS
M: Brian Austin <[email protected]>
M: Paul Handrigan <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: sound/soc/codecs/cs*

CLEANCACHE API
M: Konrad Rzeszutek Wilk <[email protected]>
L: [email protected]
Expand Down
8 changes: 8 additions & 0 deletions include/dt-bindings/sound/tlv320aic31xx-micbias.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __DT_TLV320AIC31XX_MICBIAS_H
#define __DT_TLV320AIC31XX_MICBIAS_H

#define MICBIAS_2_0V 1
#define MICBIAS_2_5V 2
#define MICBIAS_AVDDV 3

#endif /* __DT_TLV320AIC31XX_MICBIAS_H */
13 changes: 3 additions & 10 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,6 @@ typedef int (*hw_write_t)(void *,const char* ,int);

extern struct snd_ac97_bus_ops *soc_ac97_ops;

enum snd_soc_control_type {
SND_SOC_I2C = 1,
SND_SOC_SPI,
SND_SOC_REGMAP,
};

enum snd_soc_pcm_subclass {
SND_SOC_PCM_CLASS_PCM = 0,
SND_SOC_PCM_CLASS_BE = 1,
Expand Down Expand Up @@ -406,8 +400,7 @@ int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
int snd_soc_codec_writable_register(struct snd_soc_codec *codec,
unsigned int reg);
int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
int addr_bits, int data_bits,
enum snd_soc_control_type control);
struct regmap *regmap);
int snd_soc_cache_sync(struct snd_soc_codec *codec);
int snd_soc_cache_init(struct snd_soc_codec *codec);
int snd_soc_cache_exit(struct snd_soc_codec *codec);
Expand Down Expand Up @@ -614,7 +607,8 @@ struct snd_soc_jack_gpio {
struct snd_soc_jack *jack;
struct delayed_work work;

int (*jack_status_check)(void);
void *data;
int (*jack_status_check)(void *data);
};

struct snd_soc_jack {
Expand Down Expand Up @@ -717,7 +711,6 @@ struct snd_soc_codec {
/* codec IO */
void *control_data; /* codec control (i2c/3wire) data */
hw_write_t hw_write;
unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
unsigned int (*read)(struct snd_soc_codec *, unsigned int);
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
void *reg_cache;
Expand Down
18 changes: 5 additions & 13 deletions sound/soc/cirrus/snappercl15.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,13 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"MICIN", NULL, "Mic Jack"},
};

static int snappercl15_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;

snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets,
ARRAY_SIZE(tlv320aic23_dapm_widgets));

snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
return 0;
}

static struct snd_soc_dai_link snappercl15_dai = {
.name = "tlv320aic23",
.stream_name = "AIC23",
.cpu_dai_name = "ep93xx-i2s",
.codec_dai_name = "tlv320aic23-hifi",
.codec_name = "tlv320aic23-codec.0-001a",
.platform_name = "ep93xx-i2s",
.init = snappercl15_tlv320aic23_init,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
SND_SOC_DAIFMT_CBS_CFS,
.ops = &snappercl15_ops,
Expand All @@ -95,6 +82,11 @@ static struct snd_soc_card snd_soc_snappercl15 = {
.owner = THIS_MODULE,
.dai_link = &snappercl15_dai,
.num_links = 1,

.dapm_widgets = tlv320aic23_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets),
.dapm_routes = audio_map,
.num_dapm_routes = ARRAY_SIZE(audio_map),
};

static int snappercl15_probe(struct platform_device *pdev)
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/codecs/88pm860x-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,7 @@ static int pm860x_probe(struct snd_soc_codec *codec)

pm860x->codec = codec;

codec->control_data = pm860x->regmap;
ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
ret = snd_soc_codec_set_cache_io(codec, pm860x->regmap);
if (ret)
return ret;

Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_TLV320AIC23_I2C if I2C
select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
select SND_SOC_TLV320AIC26 if SPI_MASTER
select SND_SOC_TLV320AIC31XX if I2C
select SND_SOC_TLV320AIC32X4 if I2C
select SND_SOC_TLV320AIC3X if I2C
select SND_SOC_TPA6130A2 if I2C
Expand Down Expand Up @@ -449,6 +450,9 @@ config SND_SOC_TLV320AIC26
tristate
depends on SPI

config SND_SOC_TLV320AIC31XX
tristate

config SND_SOC_TLV320AIC32X4
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 @@ -79,6 +79,7 @@ snd-soc-tlv320aic23-objs := tlv320aic23.o
snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o
snd-soc-tlv320aic26-objs := tlv320aic26.o
snd-soc-tlv320aic31xx-objs := tlv320aic31xx.o
snd-soc-tlv320aic32x4-objs := tlv320aic32x4.o
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
snd-soc-tlv320dac33-objs := tlv320dac33.o
Expand Down Expand Up @@ -223,6 +224,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o
obj-$(CONFIG_SND_SOC_TLV320AIC26) += snd-soc-tlv320aic26.o
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
Expand Down
10 changes: 1 addition & 9 deletions sound/soc/codecs/ad193x.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,6 @@ static struct snd_soc_dai_driver ad193x_dai = {
static int ad193x_codec_probe(struct snd_soc_codec *codec)
{
struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec);
int ret;

codec->control_data = ad193x->regmap;
ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
return ret;
}

/* default setting for ad193x */

Expand All @@ -347,7 +339,7 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */
regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL1, 0x04);

return ret;
return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
Expand Down
7 changes: 0 additions & 7 deletions sound/soc/codecs/adau1373.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,15 +1376,8 @@ static int adau1373_probe(struct snd_soc_codec *codec)
struct adau1373_platform_data *pdata = codec->dev->platform_data;
bool lineout_differential = false;
unsigned int val;
int ret;
int i;

ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
if (ret) {
dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
return ret;
}

if (pdata) {
if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting))
return -EINVAL;
Expand Down
7 changes: 0 additions & 7 deletions sound/soc/codecs/adav80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,8 @@ static struct snd_soc_dai_driver adav80x_dais[] = {

static int adav80x_probe(struct snd_soc_codec *codec)
{
int ret;
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);

ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
if (ret) {
dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
return ret;
}

/* Force PLLs on for SYSCLK output */
snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");
Expand Down
9 changes: 0 additions & 9 deletions sound/soc/codecs/ak4535.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,6 @@ static int ak4535_resume(struct snd_soc_codec *codec)

static int ak4535_probe(struct snd_soc_codec *codec)
{
struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec);
int ret;

codec->control_data = ak4535->regmap;
ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}
/* power on device */
ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/ak4641.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,6 @@ static int ak4641_resume(struct snd_soc_codec *codec)

static int ak4641_probe(struct snd_soc_codec *codec)
{
int ret;

ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}

/* power on device */
ak4641_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/ak4642.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,6 @@ static int ak4642_resume(struct snd_soc_codec *codec)

static int ak4642_probe(struct snd_soc_codec *codec)
{
int ret;

ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}

ak4642_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;
Expand Down
12 changes: 1 addition & 11 deletions sound/soc/codecs/ak4671.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,17 +613,7 @@ static struct snd_soc_dai_driver ak4671_dai = {

static int ak4671_probe(struct snd_soc_codec *codec)
{
int ret;

ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}

ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return ret;
return ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
}

static int ak4671_remove(struct snd_soc_codec *codec)
Expand Down
7 changes: 0 additions & 7 deletions sound/soc/codecs/alc5623.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,13 +904,6 @@ static int alc5623_probe(struct snd_soc_codec *codec)
struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret;

codec->control_data = alc5623->regmap;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}

alc5623_reset(codec);

/* power on device */
Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,14 +1063,6 @@ static int alc5632_probe(struct snd_soc_codec *codec)
struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
int ret;

codec->control_data = alc5632->regmap;

ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return ret;
}

/* power on device */
alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

Expand Down
Loading

0 comments on commit f7cf71e

Please sign in to comment.