aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 12:08:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 12:08:25 -0400
commitb77279bc2e81545b20824da701b349272a78e4e7 (patch)
treed8f3a8ddf544cf201f8bdcb587cf360571487e5c /sound/soc/atmel
parent15b588303155b22edd559672905db8e59a44ef9a (diff)
parent16088cb6c02d0b766b9b8d7edff98da7f1c93205 (diff)
Merge tag 'sound-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into next
Pull sound updates from Takashi Iwai: "At this time, majority of changes come from ASoC world while we got a few new drivers in other places for FireWire and USB. There have been lots of ASoC core cleanups / refactoring, but very little visible to external users. ASoC: - Support for specifying aux CODECs in DT - Removal of the deprecated mux and enum macros - More moves towards full componentisation - Removal of some unused I/O code - Lots of cleanups, fixes and enhancements to the davinci, Freescale, Haswell and Realtek drivers - Several drivers exposed directly in Kconfig for use with simple-card - GPIO descriptor support for jacks - More updates and fixes to the Freescale SSI, Intel and rsnd drivers - New drivers for Cirrus CS42L56, Realtek RT5639, RT5642 and RT5651 and ST STA350, Analog Devices ADAU1361, ADAU1381, ADAU1761 and ADAU1781, and Realtek RT5677 HD-audio: - Clean up Dell headset quirks - Noise fixes for Dell and Sony laptops - Thinkpad T440 dock fix - Realtek codec updates (ALC293,ALC233,ALC3235) - Tegra HD-audio HDMI support FireWire-audio: - FireWire audio stack enhancement (AMDTP, MIDI), support for incoming isochronous stream and duplex streams with timestamp synchronization - BeBoB-based devices support - Fireworks-based device support USB-audio: - Behringer BCD2000 USB device support Misc: - Clean up of a few old drivers, atmel, fm801, etc" * tag 'sound-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (480 commits) ASoC: Fix wrong argument for card remove callbacks ASoC: free jack GPIOs before the sound card is freed ALSA: firewire-lib: Remove a comment about restriction of asynchronous operation ASoC: cache: Fix error code when not using ASoC level cache ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop ALSA: firewire-lib: Use IEC 61883-6 compliant labels for Raw Audio data ASoC: add RT5677 CODEC driver ASoC: intel: The Baytrail/MAX98090 driver depends on I2C ASoC: rt5640: Add the function "get_clk_info" to RL6231 shared support ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared support ASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and RT5651 ASoC: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error. ASoC: Add helper functions to cast from DAPM context to CODEC/platform ALSA: bebob: sizeof() vs ARRAY_SIZE() typo ASoC: wm9713: correct mono out PGA sources ALSA: synth: emux: soundfont.c: Cleaning up memory leak ASoC: fsl: Remove dependencies of boards for SND_SOC_EUKREA_TLV320 ASoC: fsl-ssi: Use regmap ASoC: fsl-ssi: reorder and document fsl_ssi_private ...
Diffstat (limited to 'sound/soc/atmel')
-rw-r--r--sound/soc/atmel/Kconfig2
-rw-r--r--sound/soc/atmel/atmel-pcm-pdc.c63
-rw-r--r--sound/soc/atmel/snd-soc-afeb9260.c12
3 files changed, 1 insertions, 76 deletions
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index 4789619a52d8..27e3fc4a536b 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -35,7 +35,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
35 35
36config SND_ATMEL_SOC_WM8904 36config SND_ATMEL_SOC_WM8904
37 tristate "Atmel ASoC driver for boards using WM8904 codec" 37 tristate "Atmel ASoC driver for boards using WM8904 codec"
38 depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC 38 depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && I2C
39 select SND_ATMEL_SOC_SSC 39 select SND_ATMEL_SOC_SSC
40 select SND_ATMEL_SOC_DMA 40 select SND_ATMEL_SOC_DMA
41 select SND_SOC_WM8904 41 select SND_SOC_WM8904
diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c
index 33ec592ecd75..a366b3503c28 100644
--- a/sound/soc/atmel/atmel-pcm-pdc.c
+++ b/sound/soc/atmel/atmel-pcm-pdc.c
@@ -76,12 +76,6 @@ struct atmel_runtime_data {
76 size_t period_size; 76 size_t period_size;
77 77
78 dma_addr_t period_ptr; /* physical address of next period */ 78 dma_addr_t period_ptr; /* physical address of next period */
79
80 /* PDC register save */
81 u32 pdc_xpr_save;
82 u32 pdc_xcr_save;
83 u32 pdc_xnpr_save;
84 u32 pdc_xncr_save;
85}; 79};
86 80
87/*--------------------------------------------------------------------------*\ 81/*--------------------------------------------------------------------------*\
@@ -320,67 +314,10 @@ static struct snd_pcm_ops atmel_pcm_ops = {
320 .mmap = atmel_pcm_mmap, 314 .mmap = atmel_pcm_mmap,
321}; 315};
322 316
323
324/*--------------------------------------------------------------------------*\
325 * ASoC platform driver
326\*--------------------------------------------------------------------------*/
327#ifdef CONFIG_PM
328static int atmel_pcm_suspend(struct snd_soc_dai *dai)
329{
330 struct snd_pcm_runtime *runtime = dai->runtime;
331 struct atmel_runtime_data *prtd;
332 struct atmel_pcm_dma_params *params;
333
334 if (!runtime)
335 return 0;
336
337 prtd = runtime->private_data;
338 params = prtd->params;
339
340 /* disable the PDC and save the PDC registers */
341
342 ssc_writel(params->ssc->regs, PDC_PTCR, params->mask->pdc_disable);
343
344 prtd->pdc_xpr_save = ssc_readx(params->ssc->regs, params->pdc->xpr);
345 prtd->pdc_xcr_save = ssc_readx(params->ssc->regs, params->pdc->xcr);
346 prtd->pdc_xnpr_save = ssc_readx(params->ssc->regs, params->pdc->xnpr);
347 prtd->pdc_xncr_save = ssc_readx(params->ssc->regs, params->pdc->xncr);
348
349 return 0;
350}
351
352static int atmel_pcm_resume(struct snd_soc_dai *dai)
353{
354 struct snd_pcm_runtime *runtime = dai->runtime;
355 struct atmel_runtime_data *prtd;
356 struct atmel_pcm_dma_params *params;
357
358 if (!runtime)
359 return 0;
360
361 prtd = runtime->private_data;
362 params = prtd->params;
363
364 /* restore the PDC registers and enable the PDC */
365 ssc_writex(params->ssc->regs, params->pdc->xpr, prtd->pdc_xpr_save);
366 ssc_writex(params->ssc->regs, params->pdc->xcr, prtd->pdc_xcr_save);
367 ssc_writex(params->ssc->regs, params->pdc->xnpr, prtd->pdc_xnpr_save);
368 ssc_writex(params->ssc->regs, params->pdc->xncr, prtd->pdc_xncr_save);
369
370 ssc_writel(params->ssc->regs, PDC_PTCR, params->mask->pdc_enable);
371 return 0;
372}
373#else
374#define atmel_pcm_suspend NULL
375#define atmel_pcm_resume NULL
376#endif
377
378static struct snd_soc_platform_driver atmel_soc_platform = { 317static struct snd_soc_platform_driver atmel_soc_platform = {
379 .ops = &atmel_pcm_ops, 318 .ops = &atmel_pcm_ops,
380 .pcm_new = atmel_pcm_new, 319 .pcm_new = atmel_pcm_new,
381 .pcm_free = atmel_pcm_free, 320 .pcm_free = atmel_pcm_free,
382 .suspend = atmel_pcm_suspend,
383 .resume = atmel_pcm_resume,
384}; 321};
385 322
386int atmel_pcm_pdc_platform_register(struct device *dev) 323int atmel_pcm_pdc_platform_register(struct device *dev)
diff --git a/sound/soc/atmel/snd-soc-afeb9260.c b/sound/soc/atmel/snd-soc-afeb9260.c
index f65f08beac31..9579799ace54 100644
--- a/sound/soc/atmel/snd-soc-afeb9260.c
+++ b/sound/soc/atmel/snd-soc-afeb9260.c
@@ -80,17 +80,6 @@ static const struct snd_soc_dapm_route afeb9260_audio_map[] = {
80 {"MICIN", NULL, "Mic Jack"}, 80 {"MICIN", NULL, "Mic Jack"},
81}; 81};
82 82
83static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
84{
85 struct snd_soc_codec *codec = rtd->codec;
86 struct snd_soc_dapm_context *dapm = &codec->dapm;
87
88 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
89 snd_soc_dapm_enable_pin(dapm, "Line In");
90 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
91
92 return 0;
93}
94 83
95/* Digital audio interface glue - connects codec <--> CPU */ 84/* Digital audio interface glue - connects codec <--> CPU */
96static struct snd_soc_dai_link afeb9260_dai = { 85static struct snd_soc_dai_link afeb9260_dai = {
@@ -100,7 +89,6 @@ static struct snd_soc_dai_link afeb9260_dai = {
100 .codec_dai_name = "tlv320aic23-hifi", 89 .codec_dai_name = "tlv320aic23-hifi",
101 .platform_name = "atmel_pcm-audio", 90 .platform_name = "atmel_pcm-audio",
102 .codec_name = "tlv320aic23-codec.0-001a", 91 .codec_name = "tlv320aic23-codec.0-001a",
103 .init = afeb9260_tlv320aic23_init,
104 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | 92 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
105 SND_SOC_DAIFMT_CBM_CFM, 93 SND_SOC_DAIFMT_CBM_CFM,
106 .ops = &afeb9260_ops, 94 .ops = &afeb9260_ops,