diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-23 11:01:17 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-23 11:01:17 -0400 |
commit | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (patch) | |
tree | b5d57f358bf83d31ccdad3604b4a6e82a47ff612 /sound/soc | |
parent | 4428bc0990ba545e2ef0dea8ec1b90c256b22958 (diff) | |
parent | 84eae18c867fcb7ce43d5830e23377ed33e45df9 (diff) |
Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 28 | ||||
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 28 | ||||
-rw-r--r-- | sound/soc/omap/am3517evm.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/igep0020.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap2evm.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap3beagle.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap3evm.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/sdp3430.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/sdp4430.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/zoom2.c | 4 |
10 files changed, 54 insertions, 34 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index bf6d01f4a45a..d251ff54a2d3 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -524,6 +524,22 @@ static const struct soc_enum dac33_fifo_mode_enum = | |||
524 | SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(dac33_fifo_mode_texts), | 524 | SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(dac33_fifo_mode_texts), |
525 | dac33_fifo_mode_texts); | 525 | dac33_fifo_mode_texts); |
526 | 526 | ||
527 | /* L/R Line Output Gain */ | ||
528 | static const char *lr_lineout_gain_texts[] = { | ||
529 | "Line -12dB DAC 0dB", "Line -6dB DAC 6dB", | ||
530 | "Line 0dB DAC 12dB", "Line 6dB DAC 18dB", | ||
531 | }; | ||
532 | |||
533 | static const struct soc_enum l_lineout_gain_enum = | ||
534 | SOC_ENUM_SINGLE(DAC33_LDAC_PWR_CTRL, 0, | ||
535 | ARRAY_SIZE(lr_lineout_gain_texts), | ||
536 | lr_lineout_gain_texts); | ||
537 | |||
538 | static const struct soc_enum r_lineout_gain_enum = | ||
539 | SOC_ENUM_SINGLE(DAC33_RDAC_PWR_CTRL, 0, | ||
540 | ARRAY_SIZE(lr_lineout_gain_texts), | ||
541 | lr_lineout_gain_texts); | ||
542 | |||
527 | /* | 543 | /* |
528 | * DACL/R digital volume control: | 544 | * DACL/R digital volume control: |
529 | * from 0 dB to -63.5 in 0.5 dB steps | 545 | * from 0 dB to -63.5 in 0.5 dB steps |
@@ -541,6 +557,8 @@ static const struct snd_kcontrol_new dac33_snd_controls[] = { | |||
541 | DAC33_LDAC_DIG_VOL_CTRL, DAC33_RDAC_DIG_VOL_CTRL, 7, 1, 1), | 557 | DAC33_LDAC_DIG_VOL_CTRL, DAC33_RDAC_DIG_VOL_CTRL, 7, 1, 1), |
542 | SOC_DOUBLE_R("Line to Line Out Volume", | 558 | SOC_DOUBLE_R("Line to Line Out Volume", |
543 | DAC33_LINEL_TO_LLO_VOL, DAC33_LINER_TO_RLO_VOL, 0, 127, 1), | 559 | DAC33_LINEL_TO_LLO_VOL, DAC33_LINER_TO_RLO_VOL, 0, 127, 1), |
560 | SOC_ENUM("Left Line Output Gain", l_lineout_gain_enum), | ||
561 | SOC_ENUM("Right Line Output Gain", r_lineout_gain_enum), | ||
544 | }; | 562 | }; |
545 | 563 | ||
546 | static const struct snd_kcontrol_new dac33_mode_snd_controls[] = { | 564 | static const struct snd_kcontrol_new dac33_mode_snd_controls[] = { |
@@ -651,6 +669,7 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec, | |||
651 | static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | 669 | static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) |
652 | { | 670 | { |
653 | struct snd_soc_codec *codec = dac33->codec; | 671 | struct snd_soc_codec *codec = dac33->codec; |
672 | unsigned int delay; | ||
654 | 673 | ||
655 | switch (dac33->fifo_mode) { | 674 | switch (dac33->fifo_mode) { |
656 | case DAC33_FIFO_MODE1: | 675 | case DAC33_FIFO_MODE1: |
@@ -666,8 +685,9 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) | |||
666 | dac33_write16(codec, DAC33_PREFILL_MSB, | 685 | dac33_write16(codec, DAC33_PREFILL_MSB, |
667 | DAC33_THRREG(dac33->alarm_threshold)); | 686 | DAC33_THRREG(dac33->alarm_threshold)); |
668 | /* Enable Alarm Threshold IRQ with a delay */ | 687 | /* Enable Alarm Threshold IRQ with a delay */ |
669 | udelay(SAMPLES_TO_US(dac33->burst_rate, | 688 | delay = SAMPLES_TO_US(dac33->burst_rate, |
670 | dac33->alarm_threshold)); | 689 | dac33->alarm_threshold) + 1000; |
690 | usleep_range(delay, delay + 500); | ||
671 | dac33_write(codec, DAC33_FIFO_IRQ_MASK, DAC33_MAT); | 691 | dac33_write(codec, DAC33_FIFO_IRQ_MASK, DAC33_MAT); |
672 | break; | 692 | break; |
673 | case DAC33_FIFO_MODE7: | 693 | case DAC33_FIFO_MODE7: |
@@ -767,11 +787,11 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev) | |||
767 | 787 | ||
768 | static void dac33_oscwait(struct snd_soc_codec *codec) | 788 | static void dac33_oscwait(struct snd_soc_codec *codec) |
769 | { | 789 | { |
770 | int timeout = 20; | 790 | int timeout = 60; |
771 | u8 reg; | 791 | u8 reg; |
772 | 792 | ||
773 | do { | 793 | do { |
774 | msleep(1); | 794 | usleep_range(1000, 2000); |
775 | dac33_read(codec, DAC33_INT_OSC_STATUS, ®); | 795 | dac33_read(codec, DAC33_INT_OSC_STATUS, ®); |
776 | } while (((reg & 0x03) != DAC33_OSCSTATUS_NORMAL) && timeout--); | 796 | } while (((reg & 0x03) != DAC33_OSCSTATUS_NORMAL) && timeout--); |
777 | if ((reg & 0x03) != DAC33_OSCSTATUS_NORMAL) | 797 | if ((reg & 0x03) != DAC33_OSCSTATUS_NORMAL) |
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 99b70e5978a2..329acc1a2074 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -98,16 +98,21 @@ static u8 tpa6130a2_read(int reg) | |||
98 | return data->regs[reg]; | 98 | return data->regs[reg]; |
99 | } | 99 | } |
100 | 100 | ||
101 | static void tpa6130a2_initialize(void) | 101 | static int tpa6130a2_initialize(void) |
102 | { | 102 | { |
103 | struct tpa6130a2_data *data; | 103 | struct tpa6130a2_data *data; |
104 | int i; | 104 | int i, ret = 0; |
105 | 105 | ||
106 | BUG_ON(tpa6130a2_client == NULL); | 106 | BUG_ON(tpa6130a2_client == NULL); |
107 | data = i2c_get_clientdata(tpa6130a2_client); | 107 | data = i2c_get_clientdata(tpa6130a2_client); |
108 | 108 | ||
109 | for (i = 1; i < TPA6130A2_REG_VERSION; i++) | 109 | for (i = 1; i < TPA6130A2_REG_VERSION; i++) { |
110 | tpa6130a2_i2c_write(i, data->regs[i]); | 110 | ret = tpa6130a2_i2c_write(i, data->regs[i]); |
111 | if (ret < 0) | ||
112 | break; | ||
113 | } | ||
114 | |||
115 | return ret; | ||
111 | } | 116 | } |
112 | 117 | ||
113 | static int tpa6130a2_power(int power) | 118 | static int tpa6130a2_power(int power) |
@@ -133,7 +138,16 @@ static int tpa6130a2_power(int power) | |||
133 | } | 138 | } |
134 | 139 | ||
135 | data->power_state = 1; | 140 | data->power_state = 1; |
136 | tpa6130a2_initialize(); | 141 | ret = tpa6130a2_initialize(); |
142 | if (ret < 0) { | ||
143 | dev_err(&tpa6130a2_client->dev, | ||
144 | "Failed to initialize chip\n"); | ||
145 | if (data->power_gpio >= 0) | ||
146 | gpio_set_value(data->power_gpio, 0); | ||
147 | regulator_disable(data->supply); | ||
148 | data->power_state = 0; | ||
149 | goto exit; | ||
150 | } | ||
137 | 151 | ||
138 | /* Clear SWS */ | 152 | /* Clear SWS */ |
139 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); | 153 | val = tpa6130a2_read(TPA6130A2_REG_CONTROL); |
@@ -375,7 +389,9 @@ int tpa6130a2_add_controls(struct snd_soc_codec *codec) | |||
375 | { | 389 | { |
376 | struct tpa6130a2_data *data; | 390 | struct tpa6130a2_data *data; |
377 | 391 | ||
378 | BUG_ON(tpa6130a2_client == NULL); | 392 | if (tpa6130a2_client == NULL) |
393 | return -ENODEV; | ||
394 | |||
379 | data = i2c_get_clientdata(tpa6130a2_client); | 395 | data = i2c_get_clientdata(tpa6130a2_client); |
380 | 396 | ||
381 | snd_soc_dapm_new_controls(codec, tpa6130a2_dapm_widgets, | 397 | snd_soc_dapm_new_controls(codec, tpa6130a2_dapm_widgets, |
diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 68bd902ccd4e..979dd508305f 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c | |||
@@ -157,10 +157,8 @@ static int __init am3517evm_soc_init(void) | |||
157 | { | 157 | { |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | if (!machine_is_omap3517evm()) { | 160 | if (!machine_is_omap3517evm()) |
161 | pr_err("Not OMAP3517 / AM3517 EVM!\n"); | ||
162 | return -ENODEV; | 161 | return -ENODEV; |
163 | } | ||
164 | pr_info("OMAP3517 / AM3517 EVM SoC init\n"); | 162 | pr_info("OMAP3517 / AM3517 EVM SoC init\n"); |
165 | 163 | ||
166 | am3517evm_snd_device = platform_device_alloc("soc-audio", -1); | 164 | am3517evm_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c index d296cfcc672e..fd3a40f309c8 100644 --- a/sound/soc/omap/igep0020.c +++ b/sound/soc/omap/igep0020.c | |||
@@ -101,10 +101,8 @@ static int __init igep2_soc_init(void) | |||
101 | { | 101 | { |
102 | int ret; | 102 | int ret; |
103 | 103 | ||
104 | if (!machine_is_igep0020()) { | 104 | if (!machine_is_igep0020()) |
105 | pr_debug("Not IGEP v2!\n"); | ||
106 | return -ENODEV; | 105 | return -ENODEV; |
107 | } | ||
108 | printk(KERN_INFO "IGEP v2 SoC init\n"); | 106 | printk(KERN_INFO "IGEP v2 SoC init\n"); |
109 | 107 | ||
110 | igep2_snd_device = platform_device_alloc("soc-audio", -1); | 108 | igep2_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/omap2evm.c b/sound/soc/omap/omap2evm.c index 38cd1894623e..cf3fc8a675b5 100644 --- a/sound/soc/omap/omap2evm.c +++ b/sound/soc/omap/omap2evm.c | |||
@@ -103,10 +103,8 @@ static int __init omap2evm_soc_init(void) | |||
103 | { | 103 | { |
104 | int ret; | 104 | int ret; |
105 | 105 | ||
106 | if (!machine_is_omap2evm()) { | 106 | if (!machine_is_omap2evm()) |
107 | pr_debug("Not omap2evm!\n"); | ||
108 | return -ENODEV; | 107 | return -ENODEV; |
109 | } | ||
110 | printk(KERN_INFO "omap2evm SoC init\n"); | 108 | printk(KERN_INFO "omap2evm SoC init\n"); |
111 | 109 | ||
112 | omap2evm_snd_device = platform_device_alloc("soc-audio", -1); | 110 | omap2evm_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c index 7c11e1afe9e6..e56832b0c444 100644 --- a/sound/soc/omap/omap3beagle.c +++ b/sound/soc/omap/omap3beagle.c | |||
@@ -112,10 +112,8 @@ static int __init omap3beagle_soc_init(void) | |||
112 | { | 112 | { |
113 | int ret; | 113 | int ret; |
114 | 114 | ||
115 | if (!(machine_is_omap3_beagle() || machine_is_devkit8000())) { | 115 | if (!(machine_is_omap3_beagle() || machine_is_devkit8000())) |
116 | pr_debug("Not OMAP3 Beagle or Devkit8000!\n"); | ||
117 | return -ENODEV; | 116 | return -ENODEV; |
118 | } | ||
119 | pr_info("OMAP3 Beagle/Devkit8000 SoC init\n"); | 117 | pr_info("OMAP3 Beagle/Devkit8000 SoC init\n"); |
120 | 118 | ||
121 | omap3beagle_snd_device = platform_device_alloc("soc-audio", -1); | 119 | omap3beagle_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index 1ac5babef00d..810f1e36da21 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -99,10 +99,8 @@ static int __init omap3evm_soc_init(void) | |||
99 | { | 99 | { |
100 | int ret; | 100 | int ret; |
101 | 101 | ||
102 | if (!machine_is_omap3evm()) { | 102 | if (!machine_is_omap3evm()) |
103 | pr_err("Not OMAP3 EVM!\n"); | ||
104 | return -ENODEV; | 103 | return -ENODEV; |
105 | } | ||
106 | pr_info("OMAP3 EVM SoC init\n"); | 104 | pr_info("OMAP3 EVM SoC init\n"); |
107 | 105 | ||
108 | omap3evm_snd_device = platform_device_alloc("soc-audio", -1); | 106 | omap3evm_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index 76ce77b91844..07fbcf7d2411 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -296,10 +296,8 @@ static int __init sdp3430_soc_init(void) | |||
296 | int ret; | 296 | int ret; |
297 | u8 pin_mux; | 297 | u8 pin_mux; |
298 | 298 | ||
299 | if (!machine_is_omap_3430sdp()) { | 299 | if (!machine_is_omap_3430sdp()) |
300 | pr_debug("Not SDP3430!\n"); | ||
301 | return -ENODEV; | 300 | return -ENODEV; |
302 | } | ||
303 | printk(KERN_INFO "SDP3430 SoC init\n"); | 301 | printk(KERN_INFO "SDP3430 SoC init\n"); |
304 | 302 | ||
305 | sdp3430_snd_device = platform_device_alloc("soc-audio", -1); | 303 | sdp3430_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index 62f6a622d791..4b4463db6ba0 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c | |||
@@ -186,10 +186,8 @@ static int __init sdp4430_soc_init(void) | |||
186 | { | 186 | { |
187 | int ret; | 187 | int ret; |
188 | 188 | ||
189 | if (!machine_is_omap_4430sdp()) { | 189 | if (!machine_is_omap_4430sdp()) |
190 | pr_debug("Not SDP4430!\n"); | ||
191 | return -ENODEV; | 190 | return -ENODEV; |
192 | } | ||
193 | printk(KERN_INFO "SDP4430 SoC init\n"); | 191 | printk(KERN_INFO "SDP4430 SoC init\n"); |
194 | 192 | ||
195 | sdp4430_snd_device = platform_device_alloc("soc-audio", -1); | 193 | sdp4430_snd_device = platform_device_alloc("soc-audio", -1); |
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 338dc9552bd6..718031eeac34 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -245,10 +245,8 @@ static int __init zoom2_soc_init(void) | |||
245 | { | 245 | { |
246 | int ret; | 246 | int ret; |
247 | 247 | ||
248 | if (!machine_is_omap_zoom2()) { | 248 | if (!machine_is_omap_zoom2()) |
249 | pr_debug("Not Zoom2!\n"); | ||
250 | return -ENODEV; | 249 | return -ENODEV; |
251 | } | ||
252 | printk(KERN_INFO "Zoom2 SoC init\n"); | 250 | printk(KERN_INFO "Zoom2 SoC init\n"); |
253 | 251 | ||
254 | zoom2_snd_device = platform_device_alloc("soc-audio", -1); | 252 | zoom2_snd_device = platform_device_alloc("soc-audio", -1); |