Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar@gmail.com>
To: alsa-devel@alsa-project.org
Cc: sw.youn@samsung.com, broonie@opensource.wolfsonmicro.com,
	Jassi Brar <jassi.brar@samsung.com>,
	lrg@slimlogic.co.uk
Subject: [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration
Date: Fri, 10 Sep 2010 16:41:05 +0900	[thread overview]
Message-ID: <1284104465-17287-1-git-send-email-jassisinghbrar@gmail.com> (raw)

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

             reply	other threads:[~2010-09-10  7:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-10  7:41 Jassi Brar [this message]
2010-09-10  9:54 ` [PATCH 2/3] ASoC: Samsung: Debug PCM snd_soc_dai_driver registration 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284104465-17287-1-git-send-email-jassisinghbrar@gmail.com \
    --to=jassisinghbrar@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jassi.brar@samsung.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=sw.youn@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox