* [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
@ 2010-09-10 7:41 Jassi Brar
2010-09-10 9:54 ` Mark Brown
2010-09-14 7:50 ` Mark Brown
0 siblings, 2 replies; 7+ messages in thread
From: Jassi Brar @ 2010-09-10 7:41 UTC (permalink / raw)
To: alsa-devel; +Cc: sw.youn, broonie, Jassi Brar, lrg
From: Jassi Brar <jassi.brar@samsung.com>
Each of the two PCM controllers need to be registered during probe
with appropriate 'name' of the dai driver.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/s3c24xx/s3c-pcm.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c-pcm.c b/sound/soc/s3c24xx/s3c-pcm.c
index 6174e26..d404f80 100644
--- a/sound/soc/s3c24xx/s3c-pcm.c
+++ b/sound/soc/s3c24xx/s3c-pcm.c
@@ -361,8 +361,6 @@ static struct snd_soc_dai_ops s3c_pcm_dai_ops = {
#define S3C_PCM_RATES SNDRV_PCM_RATE_8000_96000
#define S3C_PCM_DAI_DECLARE \
-{ \
- .name = "samsung-dai", \
.symmetric_rates = 1, \
.ops = &s3c_pcm_dai_ops, \
.playback = { \
@@ -376,12 +374,17 @@ static struct snd_soc_dai_ops s3c_pcm_dai_ops = {
.channels_max = 2, \
.rates = S3C_PCM_RATES, \
.formats = SNDRV_PCM_FMTBIT_S16_LE, \
- }, \
-}
+ }
struct snd_soc_dai_driver s3c_pcm_dai[] = {
- S3C_PCM_DAI_DECLARE,
- S3C_PCM_DAI_DECLARE,
+ [0] = {
+ .name = "samsung-pcm.0",
+ S3C_PCM_DAI_DECLARE,
+ },
+ [1] = {
+ .name = "samsung-pcm.1",
+ S3C_PCM_DAI_DECLARE,
+ },
};
EXPORT_SYMBOL_GPL(s3c_pcm_dai);
@@ -465,7 +468,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
}
clk_enable(pcm->pclk);
- ret = snd_soc_register_dai(&pdev->dev, s3c_pcm_dai);
+ ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get pcm_clock\n");
goto err5;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-10 7:41 [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration Jassi Brar
@ 2010-09-10 9:54 ` Mark Brown
2010-09-10 11:24 ` Jassi Brar
2010-09-14 7:50 ` Mark Brown
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2010-09-10 9:54 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, sw.youn, Jassi Brar, lrg
On Fri, Sep 10, 2010 at 04:41:05PM +0900, Jassi Brar wrote:
> struct snd_soc_dai_driver s3c_pcm_dai[] = {
> - S3C_PCM_DAI_DECLARE,
> - S3C_PCM_DAI_DECLARE,
> + [0] = {
> + .name = "samsung-pcm.0",
> + S3C_PCM_DAI_DECLARE,
You should be able to use the id field rather than adding the number to
the names here.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-10 9:54 ` Mark Brown
@ 2010-09-10 11:24 ` Jassi Brar
2010-09-10 11:47 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Jassi Brar @ 2010-09-10 11:24 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, sw.youn, Jassi Brar, lrg
2010/9/10 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Fri, Sep 10, 2010 at 04:41:05PM +0900, Jassi Brar wrote:
>
>> struct snd_soc_dai_driver s3c_pcm_dai[] = {
>> - S3C_PCM_DAI_DECLARE,
>> - S3C_PCM_DAI_DECLARE,
>> + [0] = {
>> + .name = "samsung-pcm.0",
>> + S3C_PCM_DAI_DECLARE,
>
> You should be able to use the id field rather than adding the number to
> the names here.
But the id assignment was removed by Liam's patch, maybe unintentional ?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-10 11:24 ` Jassi Brar
@ 2010-09-10 11:47 ` Mark Brown
2010-09-13 1:34 ` Jassi Brar
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2010-09-10 11:47 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, sw.youn, Jassi Brar, lrg
On Fri, Sep 10, 2010 at 08:24:03PM +0900, Jassi Brar wrote:
> 2010/9/10 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> > You should be able to use the id field rather than adding the number to
> > the names here.
> But the id assignment was removed by Liam's patch, maybe unintentional ?
Most likely an error - earlier versions of the patches didn't have the
separate ID field IIRC.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-10 11:47 ` Mark Brown
@ 2010-09-13 1:34 ` Jassi Brar
2010-09-13 8:53 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Jassi Brar @ 2010-09-13 1:34 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, sw.youn, Jassi Brar, lrg
On Fri, Sep 10, 2010 at 8:47 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Fri, Sep 10, 2010 at 08:24:03PM +0900, Jassi Brar wrote:
>> 2010/9/10 Mark Brown <broonie@opensource.wolfsonmicro.com>:
>
>> > You should be able to use the id field rather than adding the number to
>> > the names here.
>
>> But the id assignment was removed by Liam's patch, maybe unintentional ?
>
> Most likely an error - earlier versions of the patches didn't have the
> separate ID field IIRC.
>
ok, but I don't seem to be able to find out where
snd_soc_dai_driver.id is being used
and sound/soc/sh/hac.c and sound/soc/atmel/atmel_ssc_dai.c seems to
be doing similar
Are we on the same page? Please help me understand it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-13 1:34 ` Jassi Brar
@ 2010-09-13 8:53 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2010-09-13 8:53 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, sw.youn, Jassi Brar, lrg
On Mon, Sep 13, 2010 at 10:34:30AM +0900, Jassi Brar wrote:
> ok, but I don't seem to be able to find out where
> snd_soc_dai_driver.id is being used
Meh, actually it's ignored in the driver and concocted from the device.
The id field should just go from the driver structure, sorry.
> and sound/soc/sh/hac.c and sound/soc/atmel/atmel_ssc_dai.c seems to
> be doing similar
> Are we on the same page? Please help me understand it.
Neither of these platforms are especially good to use as references -
for multi-component Liam was working mostly with OMAP.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
2010-09-10 7:41 [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration Jassi Brar
2010-09-10 9:54 ` Mark Brown
@ 2010-09-14 7:50 ` Mark Brown
1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2010-09-14 7:50 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, lrg, Jassi Brar, sw.youn
On Fri, Sep 10, 2010 at 04:41:05PM +0900, Jassi Brar wrote:
> From: Jassi Brar <jassi.brar@samsung.com>
>
> Each of the two PCM controllers need to be registered during probe
> with appropriate 'name' of the dai driver.
>
> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-09-14 7:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 7:41 [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration Jassi Brar
2010-09-10 9:54 ` Mark Brown
2010-09-10 11:24 ` Jassi Brar
2010-09-10 11:47 ` Mark Brown
2010-09-13 1:34 ` Jassi Brar
2010-09-13 8:53 ` Mark Brown
2010-09-14 7:50 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox