aboutsummaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/Kconfig2
-rw-r--r--sound/soc/codecs/tlv320aic23.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 4975d8573e4..38a0e3b620a 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -68,7 +68,7 @@ config SND_SOC_TLV320AIC23
depends on I2C
config SND_SOC_TLV320AIC26
- tristate "TI TLV320AIC26 Codec support"
+ tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
depends on SPI
config SND_SOC_TLV320AIC3X
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index bac7815e00f..44308dac9e1 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -84,7 +84,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
- u8 data;
+ u8 data[2];
/* TLV320AIC23 has 7 bit address and 9 bits of data
* so we need to switch one data bit into reg and rest
@@ -96,12 +96,12 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg,
return -1;
}
- data = (reg << 1) | (value >> 8 & 0x01);
+ data[0] = (reg << 1) | (value >> 8 & 0x01);
+ data[1] = value & 0xff;
tlv320aic23_write_reg_cache(codec, reg, value);
- if (codec->hw_write(codec->control_data, data,
- (value & 0xff)) == 0)
+ if (codec->hw_write(codec->control_data, data, 2) == 2)
return 0;
printk(KERN_ERR "%s cannot write %03x to register R%d\n", __func__,
@@ -674,7 +674,7 @@ static int tlv320aic23_probe(struct platform_device *pdev)
tlv320aic23_socdev = socdev;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
- codec->hw_write = (hw_write_t) i2c_smbus_write_byte_data;
+ codec->hw_write = (hw_write_t) i2c_master_send;
codec->hw_read = NULL;
ret = i2c_add_driver(&tlv320aic23_i2c_driver);
if (ret != 0)