forked from Minki/linux
Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next
This commit is contained in:
commit
81fd7e48f4
@ -192,7 +192,7 @@ config ICS932S401
|
||||
|
||||
config ATMEL_SSC
|
||||
tristate "Device driver for Atmel SSC peripheral"
|
||||
depends on AVR32 || ARCH_AT91
|
||||
depends on HAS_IOMEM
|
||||
---help---
|
||||
This option enables device driver support for Atmel Synchronized
|
||||
Serial Communication peripheral (SSC).
|
||||
|
@ -175,7 +175,7 @@ static int ssc_probe(struct platform_device *pdev)
|
||||
|
||||
/* disable all interrupts */
|
||||
clk_enable(ssc->clk);
|
||||
ssc_writel(ssc->regs, IDR, ~0UL);
|
||||
ssc_writel(ssc->regs, IDR, -1);
|
||||
ssc_readl(ssc->regs, SR);
|
||||
clk_disable(ssc->clk);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
config SND_ATMEL_SOC
|
||||
tristate "SoC Audio for the Atmel System-on-Chip"
|
||||
depends on ARCH_AT91
|
||||
depends on HAS_IOMEM
|
||||
help
|
||||
Say Y or M if you want to add support for codecs attached to
|
||||
the ATMEL SSC interface. You will also need
|
||||
@ -24,7 +24,7 @@ config SND_ATMEL_SOC_SSC
|
||||
|
||||
config SND_AT91_SOC_SAM9G20_WM8731
|
||||
tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
|
||||
depends on ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
|
||||
depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && AT91_PROGRAMMABLE_CLOCKS
|
||||
select SND_ATMEL_SOC_PDC
|
||||
select SND_ATMEL_SOC_SSC
|
||||
select SND_SOC_WM8731
|
||||
@ -34,7 +34,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
|
||||
|
||||
config SND_AT91_SOC_AFEB9260
|
||||
tristate "SoC Audio support for AFEB9260 board"
|
||||
depends on ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
|
||||
depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
|
||||
select SND_ATMEL_SOC_PDC
|
||||
select SND_ATMEL_SOC_SSC
|
||||
select SND_SOC_TLV320AIC23
|
||||
|
@ -159,7 +159,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
pr_debug("atmel-pcm: "
|
||||
"hw_params: DMA for %s initialized "
|
||||
"(dma_bytes=%u, period_size=%u)\n",
|
||||
"(dma_bytes=%zu, period_size=%zu)\n",
|
||||
prtd->params->name,
|
||||
runtime->dma_bytes,
|
||||
prtd->period_size);
|
||||
@ -201,7 +201,7 @@ static int atmel_pcm_trigger(struct snd_pcm_substream *substream,
|
||||
int ret = 0;
|
||||
|
||||
pr_debug("atmel-pcm:buffer_size = %ld,"
|
||||
"dma_area = %p, dma_bytes = %u\n",
|
||||
"dma_area = %p, dma_bytes = %zu\n",
|
||||
rtd->buffer_size, rtd->dma_area, rtd->dma_bytes);
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -49,7 +49,7 @@ static int atmel_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
|
||||
buf->private_data = NULL;
|
||||
buf->area = dma_alloc_coherent(pcm->card->dev, size,
|
||||
&buf->addr, GFP_KERNEL);
|
||||
pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%d\n",
|
||||
pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%zu\n",
|
||||
(void *)buf->area, (void *)buf->addr, size);
|
||||
|
||||
if (!buf->area)
|
||||
|
@ -88,7 +88,8 @@ void atmel_pcm_free(struct snd_pcm *pcm);
|
||||
int atmel_pcm_mmap(struct snd_pcm_substream *substream,
|
||||
struct vm_area_struct *vma);
|
||||
|
||||
#ifdef CONFIG_SND_ATMEL_SOC_PDC
|
||||
#if defined(CONFIG_SND_ATMEL_SOC_PDC) || \
|
||||
defined(CONFIG_SND_ATMEL_SOC_PDC_MODULE)
|
||||
int atmel_pcm_pdc_platform_register(struct device *dev);
|
||||
void atmel_pcm_pdc_platform_unregister(struct device *dev);
|
||||
#else
|
||||
@ -101,7 +102,8 @@ static inline void atmel_pcm_pdc_platform_unregister(struct device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SND_ATMEL_SOC_DMA
|
||||
#if defined(CONFIG_SND_ATMEL_SOC_DMA) || \
|
||||
defined(CONFIG_SND_ATMEL_SOC_DMA_MODULE)
|
||||
int atmel_pcm_dma_platform_register(struct device *dev);
|
||||
void atmel_pcm_dma_platform_unregister(struct device *dev);
|
||||
#else
|
||||
|
@ -42,8 +42,6 @@
|
||||
#include <sound/initval.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include "atmel-pcm.h"
|
||||
#include "atmel_ssc_dai.h"
|
||||
|
||||
@ -679,15 +677,6 @@ static int atmel_ssc_resume(struct snd_soc_dai *cpu_dai)
|
||||
# define atmel_ssc_resume NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static int atmel_ssc_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct atmel_ssc_info *ssc_p = &ssc_info[dai->id];
|
||||
|
||||
snd_soc_dai_set_drvdata(dai, ssc_p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define ATMEL_SSC_RATES (SNDRV_PCM_RATE_8000_96000)
|
||||
|
||||
#define ATMEL_SSC_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |\
|
||||
@ -703,7 +692,6 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = {
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver atmel_ssc_dai = {
|
||||
.probe = atmel_ssc_probe,
|
||||
.suspend = atmel_ssc_suspend,
|
||||
.resume = atmel_ssc_resume,
|
||||
.playback = {
|
||||
@ -790,8 +778,8 @@ void atmel_ssc_put_audio(int ssc_id)
|
||||
{
|
||||
struct ssc_device *ssc = ssc_info[ssc_id].ssc;
|
||||
|
||||
ssc_free(ssc);
|
||||
asoc_ssc_exit(&ssc->pdev->dev);
|
||||
ssc_free(ssc);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(atmel_ssc_put_audio);
|
||||
|
||||
|
@ -305,10 +305,10 @@ static int at91sam9g20ek_audio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
|
||||
atmel_ssc_put_audio(0);
|
||||
snd_soc_unregister_card(card);
|
||||
clk_put(mclk);
|
||||
clk_disable(mclk);
|
||||
mclk = NULL;
|
||||
snd_soc_unregister_card(card);
|
||||
atmel_ssc_put_audio(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user