diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/Kconfig | 13 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 8 | ||||
-rw-r--r-- | sound/soc/omap/omap3evm.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap3pandora.c | 3 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx-pcm.c | 17 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 11 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 22 |
9 files changed, 66 insertions, 17 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 0b8dcb5cd729..90a0264f7538 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -265,8 +265,8 @@ static const int bosr_usb_divisor_table[] = { | |||
265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) | 265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) |
266 | static const unsigned short sr_valid_mask[] = { | 266 | static const unsigned short sr_valid_mask[] = { |
267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ | 267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ |
268 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
269 | LOWER_GROUP, /* Usb, bosr - 0*/ | 268 | LOWER_GROUP, /* Usb, bosr - 0*/ |
269 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
270 | UPPER_GROUP, /* Usb, bosr - 1*/ | 270 | UPPER_GROUP, /* Usb, bosr - 1*/ |
271 | }; | 271 | }; |
272 | /* | 272 | /* |
@@ -625,11 +625,10 @@ static int tlv320aic23_resume(struct platform_device *pdev) | |||
625 | { | 625 | { |
626 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 626 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
627 | struct snd_soc_codec *codec = socdev->card->codec; | 627 | struct snd_soc_codec *codec = socdev->card->codec; |
628 | int i; | ||
629 | u16 reg; | 628 | u16 reg; |
630 | 629 | ||
631 | /* Sync reg_cache with the hardware */ | 630 | /* Sync reg_cache with the hardware */ |
632 | for (reg = 0; reg < ARRAY_SIZE(tlv320aic23_reg); i++) { | 631 | for (reg = 0; reg < TLV320AIC23_RESET; reg++) { |
633 | u16 val = tlv320aic23_read_reg_cache(codec, reg); | 632 | u16 val = tlv320aic23_read_reg_cache(codec, reg); |
634 | tlv320aic23_write(codec, reg, val); | 633 | tlv320aic23_write(codec, reg, val); |
635 | } | 634 | } |
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index 2dee9839be86..653a362425df 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -21,7 +21,18 @@ config SND_OMAP_SOC_AMS_DELTA | |||
21 | select SND_OMAP_SOC_MCBSP | 21 | select SND_OMAP_SOC_MCBSP |
22 | select SND_SOC_CX20442 | 22 | select SND_SOC_CX20442 |
23 | help | 23 | help |
24 | Say Y if you want to add support for SoC audio on Amstrad Delta. | 24 | Say Y if you want to add support for SoC audio device connected to |
25 | a handset and a speakerphone found on Amstrad E3 (Delta) videophone. | ||
26 | |||
27 | Note that in order to get those devices fully supported, you have to | ||
28 | build the kernel with standard serial port driver included and | ||
29 | configured for at least 4 ports. Then, from userspace, you must load | ||
30 | a line discipline #19 on the modem (ttyS3) serial line. The simplest | ||
31 | way to achieve this is to install util-linux-ng and use the included | ||
32 | ldattach utility. This can be started automatically from udev, | ||
33 | a simple rule like this one should do the trick (it does for me): | ||
34 | ACTION=="add", KERNEL=="controlC0", \ | ||
35 | RUN+="/usr/sbin/ldattach 19 /dev/ttyS3" | ||
25 | 36 | ||
26 | config SND_OMAP_SOC_OSK5912 | 37 | config SND_OMAP_SOC_OSK5912 |
27 | tristate "SoC Audio support for omap osk5912" | 38 | tristate "SoC Audio support for omap osk5912" |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 5735945788bf..6a829eef2a4f 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -195,8 +195,12 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream) | |||
195 | else | 195 | else |
196 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ); | 196 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ); |
197 | 197 | ||
198 | omap_set_dma_src_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16); | 198 | if (!(cpu_class_is_omap1())) { |
199 | omap_set_dma_dest_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16); | 199 | omap_set_dma_src_burst_mode(prtd->dma_ch, |
200 | OMAP_DMA_DATA_BURST_16); | ||
201 | omap_set_dma_dest_burst_mode(prtd->dma_ch, | ||
202 | OMAP_DMA_DATA_BURST_16); | ||
203 | } | ||
200 | 204 | ||
201 | return 0; | 205 | return 0; |
202 | } | 206 | } |
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index 9114c263077b..13aa380de162 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -144,4 +144,4 @@ module_exit(omap3evm_soc_exit); | |||
144 | 144 | ||
145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); | 145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); |
146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); | 146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); |
147 | MODULE_LICENSE("GPLv2"); | 147 | MODULE_LICENSE("GPL v2"); |
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index ad219aaf7cb8..0cd06f5dd356 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -134,7 +134,7 @@ static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w, | |||
134 | * |P| <--- TWL4030 <--------- Line In and MICs | 134 | * |P| <--- TWL4030 <--------- Line In and MICs |
135 | */ | 135 | */ |
136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { | 136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { |
137 | SND_SOC_DAPM_DAC("PCM DAC", "Playback", SND_SOC_NOPM, 0, 0), | 137 | SND_SOC_DAPM_DAC("PCM DAC", "HiFi Playback", SND_SOC_NOPM, 0, 0), |
138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, | 138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, |
139 | 0, 0, NULL, 0, omap3pandora_hp_event, | 139 | 0, 0, NULL, 0, omap3pandora_hp_event, |
140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -181,6 +181,7 @@ static int omap3pandora_out_init(struct snd_soc_codec *codec) | |||
181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); | 181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); |
182 | snd_soc_dapm_nc_pin(codec, "HFL"); | 182 | snd_soc_dapm_nc_pin(codec, "HFL"); |
183 | snd_soc_dapm_nc_pin(codec, "HFR"); | 183 | snd_soc_dapm_nc_pin(codec, "HFR"); |
184 | snd_soc_dapm_nc_pin(codec, "VIBRA"); | ||
184 | 185 | ||
185 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, | 186 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, |
186 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); | 187 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); |
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index 5cbbdc80fde3..1f35c6fcf5fd 100644 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c | |||
@@ -75,11 +75,19 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream) | |||
75 | { | 75 | { |
76 | struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; | 76 | struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; |
77 | dma_addr_t pos = prtd->dma_pos; | 77 | dma_addr_t pos = prtd->dma_pos; |
78 | unsigned int limit; | ||
78 | int ret; | 79 | int ret; |
79 | 80 | ||
80 | pr_debug("Entered %s\n", __func__); | 81 | pr_debug("Entered %s\n", __func__); |
81 | 82 | ||
82 | while (prtd->dma_loaded < prtd->dma_limit) { | 83 | if (s3c_dma_has_circular()) { |
84 | limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period; | ||
85 | } else | ||
86 | limit = prtd->dma_limit; | ||
87 | |||
88 | pr_debug("%s: loaded %d, limit %d\n", __func__, prtd->dma_loaded, limit); | ||
89 | |||
90 | while (prtd->dma_loaded < limit) { | ||
83 | unsigned long len = prtd->dma_period; | 91 | unsigned long len = prtd->dma_period; |
84 | 92 | ||
85 | pr_debug("dma_loaded: %d\n", prtd->dma_loaded); | 93 | pr_debug("dma_loaded: %d\n", prtd->dma_loaded); |
@@ -123,7 +131,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel, | |||
123 | snd_pcm_period_elapsed(substream); | 131 | snd_pcm_period_elapsed(substream); |
124 | 132 | ||
125 | spin_lock(&prtd->lock); | 133 | spin_lock(&prtd->lock); |
126 | if (prtd->state & ST_RUNNING) { | 134 | if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) { |
127 | prtd->dma_loaded--; | 135 | prtd->dma_loaded--; |
128 | s3c24xx_pcm_enqueue(substream); | 136 | s3c24xx_pcm_enqueue(substream); |
129 | } | 137 | } |
@@ -164,6 +172,11 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
164 | printk(KERN_ERR "failed to get dma channel\n"); | 172 | printk(KERN_ERR "failed to get dma channel\n"); |
165 | return ret; | 173 | return ret; |
166 | } | 174 | } |
175 | |||
176 | /* use the circular buffering if we have it available. */ | ||
177 | if (s3c_dma_has_circular()) | ||
178 | s3c2410_dma_setflags(prtd->params->channel, | ||
179 | S3C2410_DMAF_CIRCULAR); | ||
167 | } | 180 | } |
168 | 181 | ||
169 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, | 182 | s3c2410_dma_set_buffdone_fn(prtd->params->channel, |
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index 3c06c401d0fb..105a77eeded0 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c | |||
@@ -220,6 +220,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev) | |||
220 | goto err; | 220 | goto err; |
221 | } | 221 | } |
222 | 222 | ||
223 | clk_enable(i2s->iis_cclk); | ||
224 | |||
223 | ret = s3c_i2sv2_probe(pdev, dai, i2s, 0); | 225 | ret = s3c_i2sv2_probe(pdev, dai, i2s, 0); |
224 | if (ret) | 226 | if (ret) |
225 | goto err_clk; | 227 | goto err_clk; |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7ff04ad2a97e..0a1b2f64bbee 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -834,6 +834,9 @@ EXPORT_SYMBOL_GPL(snd_soc_resume_device); | |||
834 | #define soc_resume NULL | 834 | #define soc_resume NULL |
835 | #endif | 835 | #endif |
836 | 836 | ||
837 | static struct snd_soc_dai_ops null_dai_ops = { | ||
838 | }; | ||
839 | |||
837 | static void snd_soc_instantiate_card(struct snd_soc_card *card) | 840 | static void snd_soc_instantiate_card(struct snd_soc_card *card) |
838 | { | 841 | { |
839 | struct platform_device *pdev = container_of(card->dev, | 842 | struct platform_device *pdev = container_of(card->dev, |
@@ -877,6 +880,11 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
877 | ac97 = 1; | 880 | ac97 = 1; |
878 | } | 881 | } |
879 | 882 | ||
883 | for (i = 0; i < card->num_links; i++) { | ||
884 | if (!card->dai_link[i].codec_dai->ops) | ||
885 | card->dai_link[i].codec_dai->ops = &null_dai_ops; | ||
886 | } | ||
887 | |||
880 | /* If we have AC97 in the system then don't wait for the | 888 | /* If we have AC97 in the system then don't wait for the |
881 | * codec. This will need revisiting if we have to handle | 889 | * codec. This will need revisiting if we have to handle |
882 | * systems with mixed AC97 and non-AC97 parts. Only check for | 890 | * systems with mixed AC97 and non-AC97 parts. Only check for |
@@ -2329,9 +2337,6 @@ static int snd_soc_unregister_card(struct snd_soc_card *card) | |||
2329 | return 0; | 2337 | return 0; |
2330 | } | 2338 | } |
2331 | 2339 | ||
2332 | static struct snd_soc_dai_ops null_dai_ops = { | ||
2333 | }; | ||
2334 | |||
2335 | /** | 2340 | /** |
2336 | * snd_soc_register_dai - Register a DAI with the ASoC core | 2341 | * snd_soc_register_dai - Register a DAI with the ASoC core |
2337 | * | 2342 | * |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 8de6f9dec4a2..66d4c165f99b 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -973,9 +973,19 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
973 | if (!w->power_check) | 973 | if (!w->power_check) |
974 | continue; | 974 | continue; |
975 | 975 | ||
976 | power = w->power_check(w); | 976 | /* If we're suspending then pull down all the |
977 | if (power) | 977 | * power. */ |
978 | sys_power = 1; | 978 | switch (event) { |
979 | case SND_SOC_DAPM_STREAM_SUSPEND: | ||
980 | power = 0; | ||
981 | break; | ||
982 | |||
983 | default: | ||
984 | power = w->power_check(w); | ||
985 | if (power) | ||
986 | sys_power = 1; | ||
987 | break; | ||
988 | } | ||
979 | 989 | ||
980 | if (w->power == power) | 990 | if (w->power == power) |
981 | continue; | 991 | continue; |
@@ -999,8 +1009,12 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
999 | case SND_SOC_DAPM_STREAM_RESUME: | 1009 | case SND_SOC_DAPM_STREAM_RESUME: |
1000 | sys_power = 1; | 1010 | sys_power = 1; |
1001 | break; | 1011 | break; |
1012 | case SND_SOC_DAPM_STREAM_SUSPEND: | ||
1013 | sys_power = 0; | ||
1014 | break; | ||
1002 | case SND_SOC_DAPM_STREAM_NOP: | 1015 | case SND_SOC_DAPM_STREAM_NOP: |
1003 | sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY; | 1016 | sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY; |
1017 | break; | ||
1004 | default: | 1018 | default: |
1005 | break; | 1019 | break; |
1006 | } | 1020 | } |
@@ -2072,9 +2086,9 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, | |||
2072 | } | 2086 | } |
2073 | } | 2087 | } |
2074 | } | 2088 | } |
2075 | mutex_unlock(&codec->mutex); | ||
2076 | 2089 | ||
2077 | dapm_power_widgets(codec, event); | 2090 | dapm_power_widgets(codec, event); |
2091 | mutex_unlock(&codec->mutex); | ||
2078 | dump_dapm(codec, __func__); | 2092 | dump_dapm(codec, __func__); |
2079 | return 0; | 2093 | return 0; |
2080 | } | 2094 | } |