Merge remote-tracking branches 'asoc/topic/tlv320dac33', 'asoc/topic/ts3a227e', 'asoc/topic/tscs42xx' and 'asoc/topic/twl4030' into asoc-next
This commit is contained in:
Коммит
04a1254cba
|
@ -0,0 +1,16 @@
|
||||||
|
TSCS42XX Audio CODEC
|
||||||
|
|
||||||
|
Required Properties:
|
||||||
|
|
||||||
|
- compatible : "tempo,tscs42A1" for analog mic
|
||||||
|
"tempo,tscs42A2" for digital mic
|
||||||
|
|
||||||
|
- reg : <0x71> for analog mic
|
||||||
|
<0x69> for digital mic
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
wookie: codec@69 {
|
||||||
|
compatible = "tempo,tscs42A2";
|
||||||
|
reg = <0x69>;
|
||||||
|
};
|
|
@ -347,6 +347,7 @@ tcg Trusted Computing Group
|
||||||
tcl Toby Churchill Ltd.
|
tcl Toby Churchill Ltd.
|
||||||
technexion TechNexion
|
technexion TechNexion
|
||||||
technologic Technologic Systems
|
technologic Technologic Systems
|
||||||
|
tempo Tempo Semiconductor
|
||||||
terasic Terasic Inc.
|
terasic Terasic Inc.
|
||||||
thine THine Electronics, Inc.
|
thine THine Electronics, Inc.
|
||||||
ti Texas Instruments
|
ti Texas Instruments
|
||||||
|
|
|
@ -13850,6 +13850,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
K: ^Subject:.*(?i)trivial
|
K: ^Subject:.*(?i)trivial
|
||||||
|
|
||||||
|
TEMPO SEMICONDUCTOR DRIVERS
|
||||||
|
M: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
|
||||||
|
S: Maintained
|
||||||
|
F: sound/soc/codecs/tscs*.c
|
||||||
|
F: sound/soc/codecs/tscs*.h
|
||||||
|
F: Documentation/devicetree/bindings/sound/tscs*.txt
|
||||||
|
|
||||||
TTY LAYER
|
TTY LAYER
|
||||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
M: Jiri Slaby <jslaby@suse.com>
|
M: Jiri Slaby <jslaby@suse.com>
|
||||||
|
|
|
@ -161,6 +161,7 @@ config SND_SOC_ALL_CODECS
|
||||||
select SND_SOC_TLV320AIC3X if I2C
|
select SND_SOC_TLV320AIC3X if I2C
|
||||||
select SND_SOC_TPA6130A2 if I2C
|
select SND_SOC_TPA6130A2 if I2C
|
||||||
select SND_SOC_TLV320DAC33 if I2C
|
select SND_SOC_TLV320DAC33 if I2C
|
||||||
|
select SND_SOC_TSCS42XX if I2C
|
||||||
select SND_SOC_TS3A227E if I2C
|
select SND_SOC_TS3A227E if I2C
|
||||||
select SND_SOC_TWL4030 if TWL4030_CORE
|
select SND_SOC_TWL4030 if TWL4030_CORE
|
||||||
select SND_SOC_TWL6040 if TWL6040_CORE
|
select SND_SOC_TWL6040 if TWL6040_CORE
|
||||||
|
@ -959,6 +960,13 @@ config SND_SOC_TS3A227E
|
||||||
tristate "TI Headset/Mic detect and keypress chip"
|
tristate "TI Headset/Mic detect and keypress chip"
|
||||||
depends on I2C
|
depends on I2C
|
||||||
|
|
||||||
|
config SND_SOC_TSCS42XX
|
||||||
|
tristate "Tempo Semiconductor TSCS42xx CODEC"
|
||||||
|
depends on I2C
|
||||||
|
select REGMAP_I2C
|
||||||
|
help
|
||||||
|
Add support for Tempo Semiconductor's TSCS42xx audio CODEC.
|
||||||
|
|
||||||
config SND_SOC_TWL4030
|
config SND_SOC_TWL4030
|
||||||
select MFD_TWL4030_AUDIO
|
select MFD_TWL4030_AUDIO
|
||||||
tristate
|
tristate
|
||||||
|
|
|
@ -171,6 +171,7 @@ snd-soc-tlv320aic32x4-i2c-objs := tlv320aic32x4-i2c.o
|
||||||
snd-soc-tlv320aic32x4-spi-objs := tlv320aic32x4-spi.o
|
snd-soc-tlv320aic32x4-spi-objs := tlv320aic32x4-spi.o
|
||||||
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
|
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
|
||||||
snd-soc-tlv320dac33-objs := tlv320dac33.o
|
snd-soc-tlv320dac33-objs := tlv320dac33.o
|
||||||
|
snd-soc-tscs42xx-objs := tscs42xx.o
|
||||||
snd-soc-ts3a227e-objs := ts3a227e.o
|
snd-soc-ts3a227e-objs := ts3a227e.o
|
||||||
snd-soc-twl4030-objs := twl4030.o
|
snd-soc-twl4030-objs := twl4030.o
|
||||||
snd-soc-twl6040-objs := twl6040.o
|
snd-soc-twl6040-objs := twl6040.o
|
||||||
|
@ -415,6 +416,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC32X4_I2C) += snd-soc-tlv320aic32x4-i2c.o
|
||||||
obj-$(CONFIG_SND_SOC_TLV320AIC32X4_SPI) += snd-soc-tlv320aic32x4-spi.o
|
obj-$(CONFIG_SND_SOC_TLV320AIC32X4_SPI) += snd-soc-tlv320aic32x4-spi.o
|
||||||
obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o
|
obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o
|
||||||
obj-$(CONFIG_SND_SOC_TLV320DAC33) += snd-soc-tlv320dac33.o
|
obj-$(CONFIG_SND_SOC_TLV320DAC33) += snd-soc-tlv320dac33.o
|
||||||
|
obj-$(CONFIG_SND_SOC_TSCS42XX) += snd-soc-tscs42xx.o
|
||||||
obj-$(CONFIG_SND_SOC_TS3A227E) += snd-soc-ts3a227e.o
|
obj-$(CONFIG_SND_SOC_TS3A227E) += snd-soc-ts3a227e.o
|
||||||
obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o
|
obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o
|
||||||
obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o
|
obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o
|
||||||
|
|
|
@ -106,6 +106,7 @@ struct tlv320dac33_priv {
|
||||||
int mode1_latency; /* latency caused by the i2c writes in
|
int mode1_latency; /* latency caused by the i2c writes in
|
||||||
* us */
|
* us */
|
||||||
u8 burst_bclkdiv; /* BCLK divider value in burst mode */
|
u8 burst_bclkdiv; /* BCLK divider value in burst mode */
|
||||||
|
u8 *reg_cache;
|
||||||
unsigned int burst_rate; /* Interface speed in Burst modes */
|
unsigned int burst_rate; /* Interface speed in Burst modes */
|
||||||
|
|
||||||
int keep_bclk; /* Keep the BCLK continuously running
|
int keep_bclk; /* Keep the BCLK continuously running
|
||||||
|
@ -121,7 +122,7 @@ struct tlv320dac33_priv {
|
||||||
unsigned int uthr;
|
unsigned int uthr;
|
||||||
|
|
||||||
enum dac33_state state;
|
enum dac33_state state;
|
||||||
void *control_data;
|
struct i2c_client *i2c;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 dac33_reg[DAC33_CACHEREGNUM] = {
|
static const u8 dac33_reg[DAC33_CACHEREGNUM] = {
|
||||||
|
@ -173,7 +174,8 @@ static const u8 dac33_reg[DAC33_CACHEREGNUM] = {
|
||||||
static inline unsigned int dac33_read_reg_cache(struct snd_soc_codec *codec,
|
static inline unsigned int dac33_read_reg_cache(struct snd_soc_codec *codec,
|
||||||
unsigned reg)
|
unsigned reg)
|
||||||
{
|
{
|
||||||
u8 *cache = codec->reg_cache;
|
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
||||||
|
u8 *cache = dac33->reg_cache;
|
||||||
if (reg >= DAC33_CACHEREGNUM)
|
if (reg >= DAC33_CACHEREGNUM)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -183,7 +185,8 @@ static inline unsigned int dac33_read_reg_cache(struct snd_soc_codec *codec,
|
||||||
static inline void dac33_write_reg_cache(struct snd_soc_codec *codec,
|
static inline void dac33_write_reg_cache(struct snd_soc_codec *codec,
|
||||||
u8 reg, u8 value)
|
u8 reg, u8 value)
|
||||||
{
|
{
|
||||||
u8 *cache = codec->reg_cache;
|
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
||||||
|
u8 *cache = dac33->reg_cache;
|
||||||
if (reg >= DAC33_CACHEREGNUM)
|
if (reg >= DAC33_CACHEREGNUM)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -200,7 +203,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
|
||||||
|
|
||||||
/* If powered off, return the cached value */
|
/* If powered off, return the cached value */
|
||||||
if (dac33->chip_power) {
|
if (dac33->chip_power) {
|
||||||
val = i2c_smbus_read_byte_data(codec->control_data, value[0]);
|
val = i2c_smbus_read_byte_data(dac33->i2c, value[0]);
|
||||||
if (val < 0) {
|
if (val < 0) {
|
||||||
dev_err(codec->dev, "Read failed (%d)\n", val);
|
dev_err(codec->dev, "Read failed (%d)\n", val);
|
||||||
value[0] = dac33_read_reg_cache(codec, reg);
|
value[0] = dac33_read_reg_cache(codec, reg);
|
||||||
|
@ -233,7 +236,7 @@ static int dac33_write(struct snd_soc_codec *codec, unsigned int reg,
|
||||||
|
|
||||||
dac33_write_reg_cache(codec, data[0], data[1]);
|
dac33_write_reg_cache(codec, data[0], data[1]);
|
||||||
if (dac33->chip_power) {
|
if (dac33->chip_power) {
|
||||||
ret = codec->hw_write(codec->control_data, data, 2);
|
ret = i2c_master_send(dac33->i2c, data, 2);
|
||||||
if (ret != 2)
|
if (ret != 2)
|
||||||
dev_err(codec->dev, "Write failed (%d)\n", ret);
|
dev_err(codec->dev, "Write failed (%d)\n", ret);
|
||||||
else
|
else
|
||||||
|
@ -280,7 +283,7 @@ static int dac33_write16(struct snd_soc_codec *codec, unsigned int reg,
|
||||||
if (dac33->chip_power) {
|
if (dac33->chip_power) {
|
||||||
/* We need to set autoincrement mode for 16 bit writes */
|
/* We need to set autoincrement mode for 16 bit writes */
|
||||||
data[0] |= DAC33_I2C_ADDR_AUTOINC;
|
data[0] |= DAC33_I2C_ADDR_AUTOINC;
|
||||||
ret = codec->hw_write(codec->control_data, data, 3);
|
ret = i2c_master_send(dac33->i2c, data, 3);
|
||||||
if (ret != 3)
|
if (ret != 3)
|
||||||
dev_err(codec->dev, "Write failed (%d)\n", ret);
|
dev_err(codec->dev, "Write failed (%d)\n", ret);
|
||||||
else
|
else
|
||||||
|
@ -1379,8 +1382,6 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
|
||||||
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
codec->control_data = dac33->control_data;
|
|
||||||
codec->hw_write = (hw_write_t) i2c_master_send;
|
|
||||||
dac33->codec = codec;
|
dac33->codec = codec;
|
||||||
|
|
||||||
/* Read the tlv320dac33 ID registers */
|
/* Read the tlv320dac33 ID registers */
|
||||||
|
@ -1438,9 +1439,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
|
||||||
.write = dac33_write_locked,
|
.write = dac33_write_locked,
|
||||||
.set_bias_level = dac33_set_bias_level,
|
.set_bias_level = dac33_set_bias_level,
|
||||||
.idle_bias_off = true,
|
.idle_bias_off = true,
|
||||||
.reg_cache_size = ARRAY_SIZE(dac33_reg),
|
|
||||||
.reg_word_size = sizeof(u8),
|
|
||||||
.reg_cache_default = dac33_reg,
|
|
||||||
.probe = dac33_soc_probe,
|
.probe = dac33_soc_probe,
|
||||||
.remove = dac33_soc_remove,
|
.remove = dac33_soc_remove,
|
||||||
|
|
||||||
|
@ -1499,7 +1498,14 @@ static int dac33_i2c_probe(struct i2c_client *client,
|
||||||
if (dac33 == NULL)
|
if (dac33 == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
dac33->control_data = client;
|
dac33->reg_cache = devm_kmemdup(&client->dev,
|
||||||
|
dac33_reg,
|
||||||
|
ARRAY_SIZE(dac33_reg) * sizeof(u8),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!dac33->reg_cache)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
dac33->i2c = client;
|
||||||
mutex_init(&dac33->mutex);
|
mutex_init(&dac33->mutex);
|
||||||
spin_lock_init(&dac33->lock);
|
spin_lock_init(&dac33->lock);
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ int ts3a227e_enable_jack_detect(struct snd_soc_component *component,
|
||||||
{
|
{
|
||||||
struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component);
|
struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component);
|
||||||
|
|
||||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
|
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
|
||||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
|
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
|
||||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
|
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
|
||||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
|
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -240,7 +240,6 @@ static struct twl4030_codec_data *twl4030_get_pdata(struct snd_soc_codec *codec)
|
||||||
sizeof(struct twl4030_codec_data),
|
sizeof(struct twl4030_codec_data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!pdata) {
|
if (!pdata) {
|
||||||
dev_err(codec->dev, "Can not allocate memory\n");
|
|
||||||
of_node_put(twl4030_codec_node);
|
of_node_put(twl4030_codec_node);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -851,14 +850,14 @@ static int snd_soc_get_volsw_twl4030(struct snd_kcontrol *kcontrol,
|
||||||
int mask = (1 << fls(max)) - 1;
|
int mask = (1 << fls(max)) - 1;
|
||||||
|
|
||||||
ucontrol->value.integer.value[0] =
|
ucontrol->value.integer.value[0] =
|
||||||
(snd_soc_read(codec, reg) >> shift) & mask;
|
(twl4030_read(codec, reg) >> shift) & mask;
|
||||||
if (ucontrol->value.integer.value[0])
|
if (ucontrol->value.integer.value[0])
|
||||||
ucontrol->value.integer.value[0] =
|
ucontrol->value.integer.value[0] =
|
||||||
max + 1 - ucontrol->value.integer.value[0];
|
max + 1 - ucontrol->value.integer.value[0];
|
||||||
|
|
||||||
if (shift != rshift) {
|
if (shift != rshift) {
|
||||||
ucontrol->value.integer.value[1] =
|
ucontrol->value.integer.value[1] =
|
||||||
(snd_soc_read(codec, reg) >> rshift) & mask;
|
(twl4030_read(codec, reg) >> rshift) & mask;
|
||||||
if (ucontrol->value.integer.value[1])
|
if (ucontrol->value.integer.value[1])
|
||||||
ucontrol->value.integer.value[1] =
|
ucontrol->value.integer.value[1] =
|
||||||
max + 1 - ucontrol->value.integer.value[1];
|
max + 1 - ucontrol->value.integer.value[1];
|
||||||
|
@ -909,9 +908,9 @@ static int snd_soc_get_volsw_r2_twl4030(struct snd_kcontrol *kcontrol,
|
||||||
int mask = (1<<fls(max))-1;
|
int mask = (1<<fls(max))-1;
|
||||||
|
|
||||||
ucontrol->value.integer.value[0] =
|
ucontrol->value.integer.value[0] =
|
||||||
(snd_soc_read(codec, reg) >> shift) & mask;
|
(twl4030_read(codec, reg) >> shift) & mask;
|
||||||
ucontrol->value.integer.value[1] =
|
ucontrol->value.integer.value[1] =
|
||||||
(snd_soc_read(codec, reg2) >> shift) & mask;
|
(twl4030_read(codec, reg2) >> shift) & mask;
|
||||||
|
|
||||||
if (ucontrol->value.integer.value[0])
|
if (ucontrol->value.integer.value[0])
|
||||||
ucontrol->value.integer.value[0] =
|
ucontrol->value.integer.value[0] =
|
||||||
|
@ -2196,8 +2195,6 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec)
|
||||||
static const struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
|
static const struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
|
||||||
.probe = twl4030_soc_probe,
|
.probe = twl4030_soc_probe,
|
||||||
.remove = twl4030_soc_remove,
|
.remove = twl4030_soc_remove,
|
||||||
.read = twl4030_read,
|
|
||||||
.write = twl4030_write,
|
|
||||||
.set_bias_level = twl4030_set_bias_level,
|
.set_bias_level = twl4030_set_bias_level,
|
||||||
.idle_bias_off = true,
|
.idle_bias_off = true,
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче