aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic23.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 18:36:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 18:36:58 -0400
commit6bb7a935489dab20802dde6c2cb7d8582f4849bf (patch)
tree872028b3c32010a8c855b4b0d3ab2f3afb303914 /sound/soc/codecs/tlv320aic23.c
parent08d19f51f05a68ce89a289320ce4ed96e757df72 (diff)
parentaf31ed217a0fe433e06c83b978bcb805ada6295a (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault() ALSA: hda - Fix quirk lists for realtek codecs ALSA: hda - Add support of ALC272 ALSA: hda - Add ALC887 support ALSA: hda - Add ALC1200 support ALSA: hda - Fix PCI SSID of ASUS M90V ALSA: hda - Add auto mic switch in realtek auto-probe mode ALSA: Fix pxa2xx-ac97-lib.c compilation ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users ALSA: hda: fix nid variable warning ALSA: ASoC: Fix compile-time warning for tlv320aic23.c
Diffstat (limited to 'sound/soc/codecs/tlv320aic23.c')
-rw-r--r--sound/soc/codecs/tlv320aic23.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index bac7815e00fb..44308dac9e18 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,
84 unsigned int value) 84 unsigned int value)
85{ 85{
86 86
87 u8 data; 87 u8 data[2];
88 88
89 /* TLV320AIC23 has 7 bit address and 9 bits of data 89 /* TLV320AIC23 has 7 bit address and 9 bits of data
90 * so we need to switch one data bit into reg and rest 90 * 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,
96 return -1; 96 return -1;
97 } 97 }
98 98
99 data = (reg << 1) | (value >> 8 & 0x01); 99 data[0] = (reg << 1) | (value >> 8 & 0x01);
100 data[1] = value & 0xff;
100 101
101 tlv320aic23_write_reg_cache(codec, reg, value); 102 tlv320aic23_write_reg_cache(codec, reg, value);
102 103
103 if (codec->hw_write(codec->control_data, data, 104 if (codec->hw_write(codec->control_data, data, 2) == 2)
104 (value & 0xff)) == 0)
105 return 0; 105 return 0;
106 106
107 printk(KERN_ERR "%s cannot write %03x to register R%d\n", __func__, 107 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)
674 674
675 tlv320aic23_socdev = socdev; 675 tlv320aic23_socdev = socdev;
676#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 676#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
677 codec->hw_write = (hw_write_t) i2c_smbus_write_byte_data; 677 codec->hw_write = (hw_write_t) i2c_master_send;
678 codec->hw_read = NULL; 678 codec->hw_read = NULL;
679 ret = i2c_add_driver(&tlv320aic23_i2c_driver); 679 ret = i2c_add_driver(&tlv320aic23_i2c_driver);
680 if (ret != 0) 680 if (ret != 0)