diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/au1x/dbdma2.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/Makefile | 1 | ||||
-rw-r--r-- | sound/soc/codecs/twl4030.c | 8 | ||||
-rw-r--r-- | sound/soc/codecs/wm8350.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8580.c | 16 | ||||
-rw-r--r-- | sound/soc/codecs/wm9705.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/omap/n810.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 12 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.h | 3 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.h | 3 | ||||
-rw-r--r-- | sound/soc/omap/osk5912.c | 4 | ||||
-rw-r--r-- | sound/soc/pxa/magician.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/palm27x.c | 27 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 37 | ||||
-rw-r--r-- | sound/soc/s3c24xx/Kconfig | 6 | ||||
-rw-r--r-- | sound/soc/s3c24xx/jive_wm8750.c | 12 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 21 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c2412-i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/sh/dma-sh7760.c | 3 |
21 files changed, 117 insertions, 58 deletions
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 30490a259148..594c6c5b7838 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c | |||
@@ -82,7 +82,7 @@ static struct au1xpsc_audio_dmadata *au1xpsc_audio_pcmdma[2]; | |||
82 | /* PCM hardware DMA capabilities - platform specific */ | 82 | /* PCM hardware DMA capabilities - platform specific */ |
83 | static const struct snd_pcm_hardware au1xpsc_pcm_hardware = { | 83 | static const struct snd_pcm_hardware au1xpsc_pcm_hardware = { |
84 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | | 84 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | |
85 | SNDRV_PCM_INFO_INTERLEAVED, | 85 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BATCH, |
86 | .formats = AU1XPSC_PCM_FMTS, | 86 | .formats = AU1XPSC_PCM_FMTS, |
87 | .period_bytes_min = AU1XPSC_PERIOD_MIN_BYTES, | 87 | .period_bytes_min = AU1XPSC_PERIOD_MIN_BYTES, |
88 | .period_bytes_max = 4096 * 1024 - 1, | 88 | .period_bytes_max = 4096 * 1024 - 1, |
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 030d2454725f..f2653803ede8 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile | |||
@@ -56,7 +56,6 @@ obj-$(CONFIG_SND_SOC_WM8900) += snd-soc-wm8900.o | |||
56 | obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o | 56 | obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o |
57 | obj-$(CONFIG_SND_SOC_WM8971) += snd-soc-wm8971.o | 57 | obj-$(CONFIG_SND_SOC_WM8971) += snd-soc-wm8971.o |
58 | obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o | 58 | obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o |
59 | obj-$(CONFIG_SND_SOC_WM8991) += snd-soc-wm8991.o | ||
60 | obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o | 59 | obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o |
61 | obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o | 60 | obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o |
62 | obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o | 61 | obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 921b205de28a..df7c8c281d2f 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -836,6 +836,12 @@ static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0); | |||
836 | static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); | 836 | static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); |
837 | 837 | ||
838 | /* | 838 | /* |
839 | * Gain control for earpiece amplifier | ||
840 | * 0 dB to 12 dB in 6 dB steps (mute instead of -6) | ||
841 | */ | ||
842 | static DECLARE_TLV_DB_SCALE(output_ear_tvl, -600, 600, 1); | ||
843 | |||
844 | /* | ||
839 | * Capture gain after the ADCs | 845 | * Capture gain after the ADCs |
840 | * from 0 dB to 31 dB in 1 dB steps | 846 | * from 0 dB to 31 dB in 1 dB steps |
841 | */ | 847 | */ |
@@ -900,7 +906,7 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { | |||
900 | 4, 3, 0, output_tvl), | 906 | 4, 3, 0, output_tvl), |
901 | 907 | ||
902 | SOC_SINGLE_TLV_TWL4030("Earpiece Playback Volume", | 908 | SOC_SINGLE_TLV_TWL4030("Earpiece Playback Volume", |
903 | TWL4030_REG_EAR_CTL, 4, 3, 0, output_tvl), | 909 | TWL4030_REG_EAR_CTL, 4, 3, 0, output_ear_tvl), |
904 | 910 | ||
905 | /* Common capture gain controls */ | 911 | /* Common capture gain controls */ |
906 | SOC_DOUBLE_R_TLV("TX1 Digital Capture Volume", | 912 | SOC_DOUBLE_R_TLV("TX1 Digital Capture Volume", |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 3b1d0993bed9..0275321ff8ab 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -968,7 +968,7 @@ static int wm8350_pcm_trigger(struct snd_pcm_substream *substream, | |||
968 | * required for LRC in master mode. The DACs or ADCs need a | 968 | * required for LRC in master mode. The DACs or ADCs need a |
969 | * valid audio path i.e. pin -> ADC or DAC -> pin before | 969 | * valid audio path i.e. pin -> ADC or DAC -> pin before |
970 | * the LRC will be enabled in master mode. */ | 970 | * the LRC will be enabled in master mode. */ |
971 | if (!master && cmd != SNDRV_PCM_TRIGGER_START) | 971 | if (!master || cmd != SNDRV_PCM_TRIGGER_START) |
972 | return 0; | 972 | return 0; |
973 | 973 | ||
974 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 974 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 442ea6f160fc..9f6be3d31ac0 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -268,9 +268,11 @@ static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1); | |||
268 | static int wm8580_out_vu(struct snd_kcontrol *kcontrol, | 268 | static int wm8580_out_vu(struct snd_kcontrol *kcontrol, |
269 | struct snd_ctl_elem_value *ucontrol) | 269 | struct snd_ctl_elem_value *ucontrol) |
270 | { | 270 | { |
271 | struct soc_mixer_control *mc = | ||
272 | (struct soc_mixer_control *)kcontrol->private_value; | ||
271 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 273 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
272 | int reg = kcontrol->private_value & 0xff; | 274 | unsigned int reg = mc->reg; |
273 | int reg2 = (kcontrol->private_value >> 24) & 0xff; | 275 | unsigned int reg2 = mc->rreg; |
274 | int ret; | 276 | int ret; |
275 | u16 val; | 277 | u16 val; |
276 | 278 | ||
@@ -292,15 +294,17 @@ static int wm8580_out_vu(struct snd_kcontrol *kcontrol, | |||
292 | return 0; | 294 | return 0; |
293 | } | 295 | } |
294 | 296 | ||
295 | #define SOC_WM8580_OUT_DOUBLE_R_TLV(xname, reg_left, reg_right, shift, max, invert, tlv_array) \ | 297 | #define SOC_WM8580_OUT_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, \ |
298 | xinvert, tlv_array) \ | ||
296 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 299 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
297 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 300 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ |
298 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 301 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
299 | .tlv.p = (tlv_array), \ | 302 | .tlv.p = (tlv_array), \ |
300 | .info = snd_soc_info_volsw_2r, \ | 303 | .info = snd_soc_info_volsw_2r, \ |
301 | .get = snd_soc_get_volsw_2r, .put = wm8580_out_vu, \ | 304 | .get = snd_soc_get_volsw_2r, .put = wm8580_out_vu, \ |
302 | .private_value = (reg_left) | ((shift) << 8) | \ | 305 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
303 | ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) } | 306 | {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ |
307 | .max = xmax, .invert = xinvert} } | ||
304 | 308 | ||
305 | static const struct snd_kcontrol_new wm8580_snd_controls[] = { | 309 | static const struct snd_kcontrol_new wm8580_snd_controls[] = { |
306 | SOC_WM8580_OUT_DOUBLE_R_TLV("DAC1 Playback Volume", | 310 | SOC_WM8580_OUT_DOUBLE_R_TLV("DAC1 Playback Volume", |
@@ -522,7 +526,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, | |||
522 | reg = wm8580_read(codec, WM8580_PLLA4 + offset); | 526 | reg = wm8580_read(codec, WM8580_PLLA4 + offset); |
523 | reg &= ~0x3f; | 527 | reg &= ~0x3f; |
524 | reg |= pll_div.prescale | pll_div.postscale << 1 | | 528 | reg |= pll_div.prescale | pll_div.postscale << 1 | |
525 | pll_div.freqmode << 4; | 529 | pll_div.freqmode << 3; |
526 | 530 | ||
527 | wm8580_write(codec, WM8580_PLLA4 + offset, reg); | 531 | wm8580_write(codec, WM8580_PLLA4 + offset, reg); |
528 | 532 | ||
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 6e23a81dba78..c2d1a7a18fa3 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
@@ -318,7 +318,7 @@ static int wm9705_reset(struct snd_soc_codec *codec) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | #ifdef CONFIG_PM | 320 | #ifdef CONFIG_PM |
321 | static int wm9705_soc_suspend(struct platform_device *pdev) | 321 | static int wm9705_soc_suspend(struct platform_device *pdev, pm_message_t msg) |
322 | { | 322 | { |
323 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 323 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
324 | struct snd_soc_codec *codec = socdev->card->codec; | 324 | struct snd_soc_codec *codec = socdev->card->codec; |
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index 3aa729df27b5..1111c710118a 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -504,7 +504,8 @@ static struct snd_soc_dai psc_i2s_dai_template = { | |||
504 | 504 | ||
505 | static const struct snd_pcm_hardware psc_i2s_pcm_hardware = { | 505 | static const struct snd_pcm_hardware psc_i2s_pcm_hardware = { |
506 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | | 506 | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | |
507 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER, | 507 | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
508 | SNDRV_PCM_INFO_BATCH, | ||
508 | .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE | | 509 | .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE | |
509 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE, | 510 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE, |
510 | .rate_min = 8000, | 511 | .rate_min = 8000, |
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index a6d1178ce128..91ef17992de5 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
@@ -417,6 +417,6 @@ static void __exit n810_soc_exit(void) | |||
417 | module_init(n810_soc_init); | 417 | module_init(n810_soc_init); |
418 | module_exit(n810_soc_exit); | 418 | module_exit(n810_soc_exit); |
419 | 419 | ||
420 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 420 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
421 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); | 421 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); |
422 | MODULE_LICENSE("GPL"); | 422 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 9c09b94f0cf8..912614283848 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -283,7 +284,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
283 | break; | 284 | break; |
284 | case SND_SOC_DAIFMT_DSP_B: | 285 | case SND_SOC_DAIFMT_DSP_B: |
285 | regs->srgr2 |= FPER(wlen * channels - 1); | 286 | regs->srgr2 |= FPER(wlen * channels - 1); |
286 | regs->srgr1 |= FWID(wlen * channels - 2); | 287 | regs->srgr1 |= FWID(0); |
287 | break; | 288 | break; |
288 | } | 289 | } |
289 | 290 | ||
@@ -302,6 +303,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
302 | { | 303 | { |
303 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); | 304 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); |
304 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; | 305 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; |
306 | unsigned int temp_fmt = fmt; | ||
305 | 307 | ||
306 | if (mcbsp_data->configured) | 308 | if (mcbsp_data->configured) |
307 | return 0; | 309 | return 0; |
@@ -328,6 +330,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
328 | /* 0-bit data delay */ | 330 | /* 0-bit data delay */ |
329 | regs->rcr2 |= RDATDLY(0); | 331 | regs->rcr2 |= RDATDLY(0); |
330 | regs->xcr2 |= XDATDLY(0); | 332 | regs->xcr2 |= XDATDLY(0); |
333 | /* Invert FS polarity configuration */ | ||
334 | temp_fmt ^= SND_SOC_DAIFMT_NB_IF; | ||
331 | break; | 335 | break; |
332 | default: | 336 | default: |
333 | /* Unsupported data format */ | 337 | /* Unsupported data format */ |
@@ -351,7 +355,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
351 | } | 355 | } |
352 | 356 | ||
353 | /* Set bit clock (CLKX/CLKR) and FS polarities */ | 357 | /* Set bit clock (CLKX/CLKR) and FS polarities */ |
354 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { | 358 | switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { |
355 | case SND_SOC_DAIFMT_NB_NF: | 359 | case SND_SOC_DAIFMT_NB_NF: |
356 | /* | 360 | /* |
357 | * Normal BCLK + FS. | 361 | * Normal BCLK + FS. |
@@ -529,6 +533,6 @@ static void __exit snd_omap_mcbsp_exit(void) | |||
529 | } | 533 | } |
530 | module_exit(snd_omap_mcbsp_exit); | 534 | module_exit(snd_omap_mcbsp_exit); |
531 | 535 | ||
532 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 536 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
533 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); | 537 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); |
534 | MODULE_LICENSE("GPL"); | 538 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-mcbsp.h b/sound/soc/omap/omap-mcbsp.h index df7ad13ba73d..c8147aace813 100644 --- a/sound/soc/omap/omap-mcbsp.h +++ b/sound/soc/omap/omap-mcbsp.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 1bdbb0427183..07cf7f46b584 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -367,6 +368,6 @@ static void __exit omap_soc_platform_exit(void) | |||
367 | } | 368 | } |
368 | module_exit(omap_soc_platform_exit); | 369 | module_exit(omap_soc_platform_exit); |
369 | 370 | ||
370 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 371 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
371 | MODULE_DESCRIPTION("OMAP PCM DMA module"); | 372 | MODULE_DESCRIPTION("OMAP PCM DMA module"); |
372 | MODULE_LICENSE("GPL"); | 373 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h index e4369bdfd77d..8d9d26916b05 100644 --- a/sound/soc/omap/omap-pcm.h +++ b/sound/soc/omap/omap-pcm.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index a952a4eb3361..a4e149b7f0eb 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c | |||
@@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, | |||
62 | /* Set codec DAI configuration */ | 62 | /* Set codec DAI configuration */ |
63 | err = snd_soc_dai_set_fmt(codec_dai, | 63 | err = snd_soc_dai_set_fmt(codec_dai, |
64 | SND_SOC_DAIFMT_DSP_B | | 64 | SND_SOC_DAIFMT_DSP_B | |
65 | SND_SOC_DAIFMT_NB_IF | | 65 | SND_SOC_DAIFMT_NB_NF | |
66 | SND_SOC_DAIFMT_CBM_CFM); | 66 | SND_SOC_DAIFMT_CBM_CFM); |
67 | if (err < 0) { | 67 | if (err < 0) { |
68 | printk(KERN_ERR "can't set codec DAI configuration\n"); | 68 | printk(KERN_ERR "can't set codec DAI configuration\n"); |
@@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, | |||
72 | /* Set cpu DAI configuration */ | 72 | /* Set cpu DAI configuration */ |
73 | err = snd_soc_dai_set_fmt(cpu_dai, | 73 | err = snd_soc_dai_set_fmt(cpu_dai, |
74 | SND_SOC_DAIFMT_DSP_B | | 74 | SND_SOC_DAIFMT_DSP_B | |
75 | SND_SOC_DAIFMT_NB_IF | | 75 | SND_SOC_DAIFMT_NB_NF | |
76 | SND_SOC_DAIFMT_CBM_CFM); | 76 | SND_SOC_DAIFMT_CBM_CFM); |
77 | if (err < 0) { | 77 | if (err < 0) { |
78 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | 78 | printk(KERN_ERR "can't set cpu DAI configuration\n"); |
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index f7c4544f7859..0625c342a1c9 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -27,8 +27,6 @@ | |||
27 | #include <sound/soc.h> | 27 | #include <sound/soc.h> |
28 | #include <sound/soc-dapm.h> | 28 | #include <sound/soc-dapm.h> |
29 | 29 | ||
30 | #include <mach/pxa-regs.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/magician.h> | 30 | #include <mach/magician.h> |
33 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
34 | #include "../codecs/uda1380.h" | 32 | #include "../codecs/uda1380.h" |
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index 48a73f64500b..44fcc4e01e08 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c | |||
@@ -200,7 +200,7 @@ static struct snd_soc_device palm27x_snd_devdata = { | |||
200 | 200 | ||
201 | static struct platform_device *palm27x_snd_device; | 201 | static struct platform_device *palm27x_snd_device; |
202 | 202 | ||
203 | static int __init palm27x_asoc_init(void) | 203 | static int palm27x_asoc_probe(struct platform_device *pdev) |
204 | { | 204 | { |
205 | int ret; | 205 | int ret; |
206 | 206 | ||
@@ -208,6 +208,10 @@ static int __init palm27x_asoc_init(void) | |||
208 | machine_is_palmld())) | 208 | machine_is_palmld())) |
209 | return -ENODEV; | 209 | return -ENODEV; |
210 | 210 | ||
211 | if (pdev->dev.platform_data) | ||
212 | palm27x_ep_gpio = ((struct palm27x_asoc_info *) | ||
213 | (pdev->dev.platform_data))->jack_gpio; | ||
214 | |||
211 | ret = gpio_request(palm27x_ep_gpio, "Headphone Jack"); | 215 | ret = gpio_request(palm27x_ep_gpio, "Headphone Jack"); |
212 | if (ret) | 216 | if (ret) |
213 | return ret; | 217 | return ret; |
@@ -245,16 +249,31 @@ err_alloc: | |||
245 | return ret; | 249 | return ret; |
246 | } | 250 | } |
247 | 251 | ||
248 | static void __exit palm27x_asoc_exit(void) | 252 | static int __devexit palm27x_asoc_remove(struct platform_device *pdev) |
249 | { | 253 | { |
250 | free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); | 254 | free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); |
251 | gpio_free(palm27x_ep_gpio); | 255 | gpio_free(palm27x_ep_gpio); |
252 | platform_device_unregister(palm27x_snd_device); | 256 | platform_device_unregister(palm27x_snd_device); |
257 | return 0; | ||
253 | } | 258 | } |
254 | 259 | ||
255 | void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) | 260 | static struct platform_driver palm27x_wm9712_driver = { |
261 | .probe = palm27x_asoc_probe, | ||
262 | .remove = __devexit_p(palm27x_asoc_remove), | ||
263 | .driver = { | ||
264 | .name = "palm27x-asoc", | ||
265 | .owner = THIS_MODULE, | ||
266 | }, | ||
267 | }; | ||
268 | |||
269 | static int __init palm27x_asoc_init(void) | ||
270 | { | ||
271 | return platform_driver_register(&palm27x_wm9712_driver); | ||
272 | } | ||
273 | |||
274 | static void __exit palm27x_asoc_exit(void) | ||
256 | { | 275 | { |
257 | palm27x_ep_gpio = data->jack_gpio; | 276 | platform_driver_unregister(&palm27x_wm9712_driver); |
258 | } | 277 | } |
259 | 278 | ||
260 | module_init(palm27x_asoc_init); | 279 | module_init(palm27x_asoc_init); |
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 308a657928d2..286be31545df 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -280,12 +280,33 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) | |||
280 | * ssp_set_clkdiv - set SSP clock divider | 280 | * ssp_set_clkdiv - set SSP clock divider |
281 | * @div: serial clock rate divider | 281 | * @div: serial clock rate divider |
282 | */ | 282 | */ |
283 | static void ssp_set_scr(struct ssp_dev *dev, u32 div) | 283 | static void ssp_set_scr(struct ssp_device *ssp, u32 div) |
284 | { | 284 | { |
285 | struct ssp_device *ssp = dev->ssp; | 285 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); |
286 | u32 sscr0 = ssp_read_reg(dev->ssp, SSCR0) & ~SSCR0_SCR; | 286 | |
287 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) { | ||
288 | sscr0 &= ~0x0000ff00; | ||
289 | sscr0 |= ((div - 2)/2) << 8; /* 2..512 */ | ||
290 | } else { | ||
291 | sscr0 &= ~0x000fff00; | ||
292 | sscr0 |= (div - 1) << 8; /* 1..4096 */ | ||
293 | } | ||
294 | ssp_write_reg(ssp, SSCR0, sscr0); | ||
295 | } | ||
296 | |||
297 | /** | ||
298 | * ssp_get_clkdiv - get SSP clock divider | ||
299 | */ | ||
300 | static u32 ssp_get_scr(struct ssp_device *ssp) | ||
301 | { | ||
302 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); | ||
303 | u32 div; | ||
287 | 304 | ||
288 | ssp_write_reg(ssp, SSCR0, (sscr0 | SSCR0_SerClkDiv(div))); | 305 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) |
306 | div = ((sscr0 >> 8) & 0xff) * 2 + 2; | ||
307 | else | ||
308 | div = ((sscr0 >> 8) & 0xfff) + 1; | ||
309 | return div; | ||
289 | } | 310 | } |
290 | 311 | ||
291 | /* | 312 | /* |
@@ -326,7 +347,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, | |||
326 | break; | 347 | break; |
327 | case PXA_SSP_CLK_AUDIO: | 348 | case PXA_SSP_CLK_AUDIO: |
328 | priv->sysclk = 0; | 349 | priv->sysclk = 0; |
329 | ssp_set_scr(&priv->dev, 1); | 350 | ssp_set_scr(ssp, 1); |
330 | sscr0 |= SSCR0_ACS; | 351 | sscr0 |= SSCR0_ACS; |
331 | break; | 352 | break; |
332 | default: | 353 | default: |
@@ -387,7 +408,7 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, | |||
387 | ssp_write_reg(ssp, SSACD, val); | 408 | ssp_write_reg(ssp, SSACD, val); |
388 | break; | 409 | break; |
389 | case PXA_SSP_DIV_SCR: | 410 | case PXA_SSP_DIV_SCR: |
390 | ssp_set_scr(&priv->dev, div); | 411 | ssp_set_scr(ssp, div); |
391 | break; | 412 | break; |
392 | default: | 413 | default: |
393 | return -ENODEV; | 414 | return -ENODEV; |
@@ -674,8 +695,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
674 | case SND_SOC_DAIFMT_I2S: | 695 | case SND_SOC_DAIFMT_I2S: |
675 | sspsp = ssp_read_reg(ssp, SSPSP); | 696 | sspsp = ssp_read_reg(ssp, SSPSP); |
676 | 697 | ||
677 | if (((sscr0 & SSCR0_SCR) == SSCR0_SerClkDiv(4)) && | 698 | if ((ssp_get_scr(ssp) == 4) && (width == 16)) { |
678 | (width == 16)) { | ||
679 | /* This is a special case where the bitclk is 64fs | 699 | /* This is a special case where the bitclk is 64fs |
680 | * and we're not dealing with 2*32 bits of audio | 700 | * and we're not dealing with 2*32 bits of audio |
681 | * samples. | 701 | * samples. |
@@ -806,6 +826,7 @@ static int pxa_ssp_probe(struct platform_device *pdev, | |||
806 | goto err_priv; | 826 | goto err_priv; |
807 | } | 827 | } |
808 | 828 | ||
829 | priv->dai_fmt = (unsigned int) -1; | ||
809 | dai->private_data = priv; | 830 | dai->private_data = priv; |
810 | 831 | ||
811 | return 0; | 832 | return 0; |
diff --git a/sound/soc/s3c24xx/Kconfig b/sound/soc/s3c24xx/Kconfig index 2f3a21eee051..df494d1e346f 100644 --- a/sound/soc/s3c24xx/Kconfig +++ b/sound/soc/s3c24xx/Kconfig | |||
@@ -1,10 +1,10 @@ | |||
1 | config SND_S3C24XX_SOC | 1 | config SND_S3C24XX_SOC |
2 | tristate "SoC Audio for the Samsung S3CXXXX chips" | 2 | tristate "SoC Audio for the Samsung S3CXXXX chips" |
3 | depends on ARCH_S3C2410 || ARCH_S3C64XX | 3 | depends on ARCH_S3C2410 |
4 | help | 4 | help |
5 | Say Y or M if you want to add support for codecs attached to | 5 | Say Y or M if you want to add support for codecs attached to |
6 | the S3C24XX and S3C64XX AC97, I2S or SSP interface. You will | 6 | the S3C24XX AC97 or I2S interfaces. You will also need to |
7 | also need to select the audio interfaces to support below. | 7 | select the audio interfaces to support below. |
8 | 8 | ||
9 | config SND_S3C24XX_SOC_I2S | 9 | config SND_S3C24XX_SOC_I2S |
10 | tristate | 10 | tristate |
diff --git a/sound/soc/s3c24xx/jive_wm8750.c b/sound/soc/s3c24xx/jive_wm8750.c index 32063790d95b..93e6c87b7399 100644 --- a/sound/soc/s3c24xx/jive_wm8750.c +++ b/sound/soc/s3c24xx/jive_wm8750.c | |||
@@ -69,8 +69,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream, | |||
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | 71 | ||
72 | s3c_i2sv2_calc_rate(&div, NULL, params_rate(params), | 72 | s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params), |
73 | s3c2412_get_iisclk()); | 73 | s3c2412_get_iisclk()); |
74 | 74 | ||
75 | /* set codec DAI configuration */ | 75 | /* set codec DAI configuration */ |
76 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | 76 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | |
@@ -145,8 +145,9 @@ static struct snd_soc_dai_link jive_dai = { | |||
145 | }; | 145 | }; |
146 | 146 | ||
147 | /* jive audio machine driver */ | 147 | /* jive audio machine driver */ |
148 | static struct snd_soc_machine snd_soc_machine_jive = { | 148 | static struct snd_soc_card snd_soc_machine_jive = { |
149 | .name = "Jive", | 149 | .name = "Jive", |
150 | .platform = &s3c24xx_soc_platform, | ||
150 | .dai_link = &jive_dai, | 151 | .dai_link = &jive_dai, |
151 | .num_links = 1, | 152 | .num_links = 1, |
152 | }; | 153 | }; |
@@ -157,9 +158,8 @@ static struct wm8750_setup_data jive_wm8750_setup = { | |||
157 | 158 | ||
158 | /* jive audio subsystem */ | 159 | /* jive audio subsystem */ |
159 | static struct snd_soc_device jive_snd_devdata = { | 160 | static struct snd_soc_device jive_snd_devdata = { |
160 | .machine = &snd_soc_machine_jive, | 161 | .card = &snd_soc_machine_jive, |
161 | .platform = &s3c24xx_soc_platform, | 162 | .codec_dev = &soc_codec_dev_wm8750, |
162 | .codec_dev = &soc_codec_dev_wm8750_spi, | ||
163 | .codec_data = &jive_wm8750_setup, | 163 | .codec_data = &jive_wm8750_setup, |
164 | }; | 164 | }; |
165 | 165 | ||
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index 295a4c910262..ab680aac3fcb 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -473,9 +473,9 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, | |||
473 | /* default table of all avaialable root fs divisors */ | 473 | /* default table of all avaialable root fs divisors */ |
474 | static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; | 474 | static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; |
475 | 475 | ||
476 | int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, | 476 | int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, |
477 | unsigned int *fstab, | 477 | unsigned int *fstab, |
478 | unsigned int rate, struct clk *clk) | 478 | unsigned int rate, struct clk *clk) |
479 | { | 479 | { |
480 | unsigned long clkrate = clk_get_rate(clk); | 480 | unsigned long clkrate = clk_get_rate(clk); |
481 | unsigned int div; | 481 | unsigned int div; |
@@ -531,7 +531,7 @@ int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, | |||
531 | 531 | ||
532 | return 0; | 532 | return 0; |
533 | } | 533 | } |
534 | EXPORT_SYMBOL_GPL(s3c2412_iis_calc_rate); | 534 | EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate); |
535 | 535 | ||
536 | int s3c_i2sv2_probe(struct platform_device *pdev, | 536 | int s3c_i2sv2_probe(struct platform_device *pdev, |
537 | struct snd_soc_dai *dai, | 537 | struct snd_soc_dai *dai, |
@@ -624,15 +624,18 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai) | |||
624 | 624 | ||
625 | int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) | 625 | int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) |
626 | { | 626 | { |
627 | dai->ops.trigger = s3c2412_i2s_trigger; | 627 | struct snd_soc_dai_ops *ops = dai->ops; |
628 | dai->ops.hw_params = s3c2412_i2s_hw_params; | 628 | |
629 | dai->ops.set_fmt = s3c2412_i2s_set_fmt; | 629 | ops->trigger = s3c2412_i2s_trigger; |
630 | dai->ops.set_clkdiv = s3c2412_i2s_set_clkdiv; | 630 | ops->hw_params = s3c2412_i2s_hw_params; |
631 | ops->set_fmt = s3c2412_i2s_set_fmt; | ||
632 | ops->set_clkdiv = s3c2412_i2s_set_clkdiv; | ||
631 | 633 | ||
632 | dai->suspend = s3c2412_i2s_suspend; | 634 | dai->suspend = s3c2412_i2s_suspend; |
633 | dai->resume = s3c2412_i2s_resume; | 635 | dai->resume = s3c2412_i2s_resume; |
634 | 636 | ||
635 | return snd_soc_register_dai(dai); | 637 | return snd_soc_register_dai(dai); |
636 | } | 638 | } |
637 | |||
638 | EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); | 639 | EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); |
640 | |||
641 | MODULE_LICENSE("GPL"); | ||
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c index 1ca3cdaa8213..b7e0b3f0bfc8 100644 --- a/sound/soc/s3c24xx/s3c2412-i2s.c +++ b/sound/soc/s3c24xx/s3c2412-i2s.c | |||
@@ -33,8 +33,8 @@ | |||
33 | 33 | ||
34 | #include <plat/regs-s3c2412-iis.h> | 34 | #include <plat/regs-s3c2412-iis.h> |
35 | 35 | ||
36 | #include <plat/regs-gpio.h> | ||
37 | #include <plat/audio.h> | 36 | #include <plat/audio.h> |
37 | #include <mach/regs-gpio.h> | ||
38 | #include <mach/dma.h> | 38 | #include <mach/dma.h> |
39 | 39 | ||
40 | #include "s3c24xx-pcm.h" | 40 | #include "s3c24xx-pcm.h" |
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 0dad3a0bb920..baddb1242c71 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c | |||
@@ -103,7 +103,8 @@ static struct snd_pcm_hardware camelot_pcm_hardware = { | |||
103 | .info = (SNDRV_PCM_INFO_MMAP | | 103 | .info = (SNDRV_PCM_INFO_MMAP | |
104 | SNDRV_PCM_INFO_INTERLEAVED | | 104 | SNDRV_PCM_INFO_INTERLEAVED | |
105 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 105 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
106 | SNDRV_PCM_INFO_MMAP_VALID), | 106 | SNDRV_PCM_INFO_MMAP_VALID | |
107 | SNDRV_PCM_INFO_BATCH), | ||
107 | .formats = DMABRG_FMTS, | 108 | .formats = DMABRG_FMTS, |
108 | .rates = DMABRG_RATES, | 109 | .rates = DMABRG_RATES, |
109 | .rate_min = 8000, | 110 | .rate_min = 8000, |