diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 08:32:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 08:32:05 -0700 |
commit | 33081adf8b89d5a716d7e1c60171768d39795b39 (patch) | |
tree | 275de58bbbb5f7ddffcdc087844cfc7fbe4315be /sound/soc/pxa/pxa2xx-pcm.c | |
parent | c55960499f810357a29659b32d6ea594abee9237 (diff) | |
parent | 506ecbca71d07fa327dd986be1682e90885678ee (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: (365 commits)
ALSA: hda - Disable sticky PCM stream assignment for AD codecs
ALSA: usb - Creative USB X-Fi volume knob support
ALSA: ca0106: Use card specific dac id for mute controls.
ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.
ALSA: ca0106: Create a nice spot for mapping channels to dacs.
ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence.
ALSA: ca0106: Pull out dac powering routine into separate function.
ALSA: ca0106 - add Sound Blaster 5.1vx info.
ASoC: tlv320dac33: Use usleep_range for delays
ALSA: usb-audio: add Novation Launchpad support
ALSA: hda - Add workarounds for CT-IBG controllers
ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
ASoC: tpa6130a2: Error handling for broken chip
ASoC: max98088: Staticise m98088_eq_band
ASoC: soc-core: Fix codec->name memory leak
ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066
ALSA: hda - Add some workarounds for Creative IBG
ALSA: hda - Fix wrong SPDIF NID assignment for CA0110
ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
ALSA: hda - Add alc_init_jacks() call to other codecs
...
Diffstat (limited to 'sound/soc/pxa/pxa2xx-pcm.c')
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index adc7e6f15f9..02fb66416dd 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c @@ -16,7 +16,6 @@ #include <sound/soc.h> #include <sound/pxa2xx-lib.h> -#include "pxa2xx-pcm.h" #include "../../arm/pxa2xx-pcm.h" static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, @@ -28,7 +27,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, struct pxa2xx_pcm_dma_params *dma; int ret; - dma = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); + dma = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); /* return if this is a bufferless transfer e.g. * codec <--> BT codec or GSM modem -- lg FIXME */ @@ -95,14 +94,14 @@ static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, if (!card->dev->coherent_dma_mask) card->dev->coherent_dma_mask = DMA_BIT_MASK(32); - if (dai->playback.channels_min) { + if (dai->driver->playback.channels_min) { ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); if (ret) goto out; } - if (dai->capture.channels_min) { + if (dai->driver->capture.channels_min) { ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_CAPTURE); if (ret) @@ -112,25 +111,44 @@ static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, return ret; } -struct snd_soc_platform pxa2xx_soc_platform = { - .name = "pxa2xx-audio", - .pcm_ops = &pxa2xx_pcm_ops, +static struct snd_soc_platform_driver pxa2xx_soc_platform = { + .ops = &pxa2xx_pcm_ops, .pcm_new = pxa2xx_soc_pcm_new, .pcm_free = pxa2xx_pcm_free_dma_buffers, }; -EXPORT_SYMBOL_GPL(pxa2xx_soc_platform); -static int __init pxa2xx_soc_platform_init(void) +static int __devinit pxa2xx_soc_platform_probe(struct platform_device *pdev) { - return snd_soc_register_platform(&pxa2xx_soc_platform); + return snd_soc_register_platform(&pdev->dev, &pxa2xx_soc_platform); } -module_init(pxa2xx_soc_platform_init); -static void __exit pxa2xx_soc_platform_exit(void) +static int __devexit pxa2xx_soc_platform_remove(struct platform_device *pdev) { - snd_soc_unregister_platform(&pxa2xx_soc_platform); + snd_soc_unregister_platform(&pdev->dev); + return 0; +} + +static struct platform_driver pxa_pcm_driver = { + .driver = { + .name = "pxa-pcm-audio", + .owner = THIS_MODULE, + }, + + .probe = pxa2xx_soc_platform_probe, + .remove = __devexit_p(pxa2xx_soc_platform_remove), +}; + +static int __init snd_pxa_pcm_init(void) +{ + return platform_driver_register(&pxa_pcm_driver); +} +module_init(snd_pxa_pcm_init); + +static void __exit snd_pxa_pcm_exit(void) +{ + platform_driver_unregister(&pxa_pcm_driver); } -module_exit(pxa2xx_soc_platform_exit); +module_exit(snd_pxa_pcm_exit); MODULE_AUTHOR("Nicolas Pitre"); MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module"); |