* [PATCH 0/4] ASoC: atmel: fixes for working as module
@ 2013-01-31 3:53 Bo Shen
2013-01-31 3:53 ` [PATCH 1/4] ASoC: atmel_pcm: make it buildable " Bo Shen
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Bo Shen @ 2013-01-31 3:53 UTC (permalink / raw)
To: linux-arm-kernel
The following patches fixes the audio part when working as module
Bo Shen (4):
ASoC: atmel_pcm: make it buildable as module
ASoC: atmel_ssc_dai: remove error set private data
ASoC: atmel_ssc_dai: correct sequence when unload
ASoC: sam9g20_wm8731: disable clock and correct sequence when unload
sound/soc/atmel/atmel-pcm.h | 6 ++++--
sound/soc/atmel/atmel_ssc_dai.c | 12 +-----------
sound/soc/atmel/sam9g20_wm8731.c | 6 +++---
3 files changed, 8 insertions(+), 16 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] ASoC: atmel_pcm: make it buildable as module
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
@ 2013-01-31 3:53 ` Bo Shen
2013-01-31 3:53 ` [PATCH 2/4] ASoC: atmel_ssc_dai: remove error set private data Bo Shen
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2013-01-31 3:53 UTC (permalink / raw)
To: linux-arm-kernel
When build as module, it reports following error, using this patch
fix it
sound/soc/atmel/atmel-pcm-pdc.c:387: error: redefinition of 'atmel_pcm_pdc_platform_register'
sound/soc/atmel/atmel-pcm.h:95: note: previous definition of 'atmel_pcm_pdc_platform_register' was here
sound/soc/atmel/atmel-pcm-pdc.c:393: error: redefinition of 'atmel_pcm_pdc_platform_unregister'
sound/soc/atmel/atmel-pcm.h:99: note: previous definition of 'atmel_pcm_pdc_platform_unregister' was here
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
sound/soc/atmel/atmel-pcm.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/atmel/atmel-pcm.h b/sound/soc/atmel/atmel-pcm.h
index bb45d20..12ae814 100644
--- a/sound/soc/atmel/atmel-pcm.h
+++ b/sound/soc/atmel/atmel-pcm.h
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] ASoC: atmel_ssc_dai: remove error set private data
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
2013-01-31 3:53 ` [PATCH 1/4] ASoC: atmel_pcm: make it buildable " Bo Shen
@ 2013-01-31 3:53 ` Bo Shen
2013-01-31 3:53 ` [PATCH 3/4] ASoC: atmel_ssc_dai: correct sequence when unload Bo Shen
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2013-01-31 3:53 UTC (permalink / raw)
To: linux-arm-kernel
ssc private data has been set in ssc driver, this cause the error
private data set to ssc, remove it
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
sound/soc/atmel/atmel_ssc_dai.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 1c76634..2763aea 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -679,15 +679,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 +694,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 = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] ASoC: atmel_ssc_dai: correct sequence when unload
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
2013-01-31 3:53 ` [PATCH 1/4] ASoC: atmel_pcm: make it buildable " Bo Shen
2013-01-31 3:53 ` [PATCH 2/4] ASoC: atmel_ssc_dai: remove error set private data Bo Shen
@ 2013-01-31 3:53 ` Bo Shen
2013-01-31 3:53 ` [PATCH 4/4] ASoC: sam9g20_wm8731: disable clock and " Bo Shen
2013-02-04 18:34 ` [PATCH 0/4] ASoC: atmel: fixes for working as module Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2013-01-31 3:53 UTC (permalink / raw)
To: linux-arm-kernel
correct the sequence when unload this module
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
sound/soc/atmel/atmel_ssc_dai.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 2763aea..1fab8d5 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -780,8 +780,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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] ASoC: sam9g20_wm8731: disable clock and correct sequence when unload
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
` (2 preceding siblings ...)
2013-01-31 3:53 ` [PATCH 3/4] ASoC: atmel_ssc_dai: correct sequence when unload Bo Shen
@ 2013-01-31 3:53 ` Bo Shen
2013-02-04 18:34 ` [PATCH 0/4] ASoC: atmel: fixes for working as module Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2013-01-31 3:53 UTC (permalink / raw)
To: linux-arm-kernel
disable clock and correct sequence when unload
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
sound/soc/atmel/sam9g20_wm8731.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
index da97629..2d6fbd0 100644
--- a/sound/soc/atmel/sam9g20_wm8731.c
+++ b/sound/soc/atmel/sam9g20_wm8731.c
@@ -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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/4] ASoC: atmel: fixes for working as module
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
` (3 preceding siblings ...)
2013-01-31 3:53 ` [PATCH 4/4] ASoC: sam9g20_wm8731: disable clock and " Bo Shen
@ 2013-02-04 18:34 ` Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-02-04 18:34 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jan 31, 2013 at 11:53:36AM +0800, Bo Shen wrote:
> The following patches fixes the audio part when working as module
>
> Bo Shen (4):
> ASoC: atmel_pcm: make it buildable as module
> ASoC: atmel_ssc_dai: remove error set private data
> ASoC: atmel_ssc_dai: correct sequence when unload
> ASoC: sam9g20_wm8731: disable clock and correct sequence when unload
Applied all, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130204/bacfbc1a/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-04 18:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 3:53 [PATCH 0/4] ASoC: atmel: fixes for working as module Bo Shen
2013-01-31 3:53 ` [PATCH 1/4] ASoC: atmel_pcm: make it buildable " Bo Shen
2013-01-31 3:53 ` [PATCH 2/4] ASoC: atmel_ssc_dai: remove error set private data Bo Shen
2013-01-31 3:53 ` [PATCH 3/4] ASoC: atmel_ssc_dai: correct sequence when unload Bo Shen
2013-01-31 3:53 ` [PATCH 4/4] ASoC: sam9g20_wm8731: disable clock and " Bo Shen
2013-02-04 18:34 ` [PATCH 0/4] ASoC: atmel: fixes for working as module Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).