All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Nicolin Chen <b42378@freescale.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: ASoC: codec: SPDIF only works with Tx/Rx seperate codec drivers?
Date: Fri, 12 Jul 2013 16:26:17 +0200	[thread overview]
Message-ID: <51E01209.9020904@metafoo.de> (raw)
In-Reply-To: <20130712083030.GA28555@MrMyself>

On 07/12/2013 10:30 AM, Nicolin Chen wrote:
> Hi Mark,
> 
> I've a little question about SPDIF codec drivers.
> 
> I found there're spdif_receiver.c and spdif_transmitter.c, two files,
> in sound/soc/codecs directory. So it looks like SPDIF module would work
> separately as one IN device and one OUT device, for example:
> dts/spear1340.dtsi:		spdif-in@d0100000 {
> dts/spear1340.dtsi:			compatible = "st,spdif-in";
> dts/spear1340.dtsi:		spdif-out@d0000000 {
> dts/spear1340.dtsi:			compatible = "st,spdif-out";
> 
> But the question is what if a SPDIF module have both Tx and Rx function
> in one simple CPU DAI. Is that okay to add a new codec driver for this
> situation?
> 
> Actually I'm gonna prepare some patches to add Freescale SPDIF drivers.
> But this needs to create a brand new dummy SPDIF codec driver, which's
> some kinda same as spdif_receiver/transmitter.c but quite different
> in the supports of SAMPLE_RATE/FORMAT and IN/OUT-in-one integration.
> 
> So I just want to make sure if this'll be okay.

The current drivers should work fine with this. You can create a card with
two DAI links

static struct snd_soc_dai_link dai_links[] = {
	{
		.name = "S/PDIF TX",
		.stream_name = "S/PDIF PCM Playback",
		.platform_name = "your-platform",
		.cpu_dai_name = "your-cpu-dai",
		.codec_dai_name = "dit-hifi",
		.codec_name = "spdif-dit",
	}, {
		.name = "S/PDIF RX",
		.stream_name = "S/PDIF PCM Playback",
		.platform_name = "your-platform",
		.cpu_dai_name = "your-cpu-dai",
		.codec_dai_name = "dir-hifi",
		.codec_name = "spdif-dir",
	},
};

  parent reply	other threads:[~2013-07-12 14:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12  8:30 ASoC: codec: SPDIF only works with Tx/Rx seperate codec drivers? Nicolin Chen
2013-07-12 11:33 ` Mark Brown
2013-07-12 11:57   ` Nicolin Chen
2013-07-12 14:29     ` Mark Brown
2013-07-12 14:26 ` Lars-Peter Clausen [this message]
2013-07-15  2:11   ` Nicolin Chen

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=51E01209.9020904@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=b42378@freescale.com \
    --cc=broonie@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.