alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Andrew Lunn <andrew@lunn.ch>,
	alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Jean-Francois Moine <moinejf@free.fr>,
	Takashi Iwai <tiwai@suse.de>, Liam Girdwood <lgirdwood@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 00/14] SPDIF support
Date: Mon, 2 Sep 2013 17:59:33 +0100	[thread overview]
Message-ID: <20130902165932.GZ6617@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130902162729.GT3084@sirena.org.uk>

On Mon, Sep 02, 2013 at 05:27:29PM +0100, Mark Brown wrote:
> On Mon, Sep 02, 2013 at 03:16:31PM +0100, Russell King - ARM Linux wrote:
> > On Mon, Sep 02, 2013 at 03:06:32PM +0100, Mark Brown wrote:
> 
> > > Yes, and this is one of the reasons for suggesting getting either/or
> > > support merged - it will help things like the binding definition
> > > progress (as well as being useful for any users with a S/PDIF only
> > > system).
> 
> > Sorry, but I believe the exact opposite:
> 
> > 1. The DAI link binding created for a dual-DAI driver is completely
> >    different from the DAI link binding for a DPCM driver.  The dual
> >    DAI link binding will have to be completely rewritten when the
> >    driver is converted to DPCM.
> 
> That seems like overstating the difficulties.  The updates for any new
> S/PDIF drivers will be pretty much the same as those for the existing
> I2S drivers and should just be mechanical changes, nothing too taxing.

Sorry, you need to explain more.

Here's the dual-DAI version:

                .name = "S/PDIF1",
                .stream_name = "IEC958 Playback",
                .platform_name = "mvebu-audio.1",
                .cpu_dai_name = "kirkwood-spdif.1",
                .codec_dai_name = "dit-hifi",
                .codec_name = "spdif-dit",

Here's the DPCM version:

        {
                .name = "S/PDIF1",
                .stream_name = "Audio Playback",
                .platform_name = "mvebu-audio.1",
                .cpu_dai_name = "mvebu-audio.1",
                .codec_name = "snd-soc-dummy",
                .codec_dai_name = "snd-soc-dummy-dai",
                .dynamic = 1,
        }, {
                .name = "Codec",
                .stream_name = "IEC958 Playback",
                .cpu_dai_name = "snd-soc-dummy-dai",
                .platform_name = "snd-soc-dummy",
                .no_pcm = 1,
                .codec_dai_name = "dit-hifi",
                .codec_name = "spdif-dit",
        },

The above are two completely different beasts.  Please explain how the DT
representation for those DAI links can be the same.

> > 2. When the driver is converted to DPCM, it must use DPCM for
> >    everything, otherwise it has no way to know which of SPDIF or I2S to
> >    enable.  The only way I know to work around that is to add additional
> >    routes to link up the AIF widgets, and that's the solution you're all
> >    telling me is not acceptable, as per the patch set at the start of
> >    this thread.
> 
> What we have been telling you is that if there is a DAI link present
> (there should be one for each physical DAI link) then this should be
> enough information for the framework to know that the two DAIs are
> linked and if any routes are needed in DAPM these should be added
> automatically in the same way that we add links for CODEC<->CODEC links
> at present.
> 
> It's been said to you off-list that having the links manually added
> but marking them for removal when the framework figures out how to do
> that should be OK.

Sorry, I just don't get this.  What you seem to be telling me here is to
forget DPCM, and just go with the dual DAI solution.

If I have separate CPU DAI links, then I can't do simultaneous operation,
because both DAI links are entirely separate entities which are activated
entirely separately.  The only way I know how to handle this is with the
patch set I've already posted.

We've been through this before: this is also not how Liam's example DPCM
driver works - please go back and look at those diagrams I drew you of
how Liam's driver is setup.  I've also said to you that from what I can
see, the routes are still required for DPCM - those routes are in Liam's
DPCM driver as well.

  reply	other threads:[~2013-09-02 16:59 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-31 12:34 [PATCH 00/14] SPDIF support Russell King - ARM Linux
2013-08-31 12:35 ` [PATCH 01/14] ASoC: kirkwood: merge struct kirkwood_dma_priv with struct kirkwood_dma_data Russell King
2013-08-31 12:36 ` [PATCH 02/14] ASoC: kirkwood: use devm_clk_get() for the external clock Russell King
2013-08-31 12:37 ` [PATCH 03/14] ASoC: avoid duplicated DAI routes Russell King
2013-08-31 12:38 ` [PATCH 04/14] ASoC: kirkwood: provide KIRKWOOD_PLAYCTL_ENABLE_MASK Russell King
2013-08-31 12:39 ` [PATCH 05/14] ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma drivers Russell King
2013-08-31 12:40 ` [PATCH 06/14] ASoC: kirkwood: move calculation of max buffer size to kirkwood.h Russell King
2013-08-31 12:41 ` [PATCH 07/14] ASoC: spdif_transceiver: add output pin widget Russell King
2013-08-31 12:42 ` [PATCH 08/14] ASoC: kirkwood: prefer external clock over internal clock Russell King
2013-09-01 16:41   ` Jean-Francois Moine
2013-09-02 11:01     ` Mark Brown
2013-09-02 14:17       ` Russell King - ARM Linux
2013-08-31 12:43 ` [PATCH 09/14] ASoC: kirkwood-dma: remove IEC958_SUBFRAME formats Russell King
2013-09-02 11:02   ` Mark Brown
2013-08-31 12:44 ` [PATCH 10/14] ASoC: kirkwood: add DAPM widgets for input and output routing Russell King
2013-08-31 12:45 ` [PATCH 11/14] ASoC: kirkwood-openrd: add DAPM links between codec and cpu DAI Russell King
2013-08-31 12:46 ` [PATCH 12/14] ASoC: kirkwood-t5325: " Russell King
2013-08-31 12:47 ` [PATCH 13/14] ASoC: kirkwood: add SPDIF output support Russell King
2013-09-03 11:17   ` Mark Brown
2013-09-03 11:38     ` Russell King - ARM Linux
2013-09-03 11:59       ` Mark Brown
2013-09-03 13:34         ` Russell King - ARM Linux
2013-09-04 16:34           ` Mark Brown
2013-08-31 12:48 ` [PATCH 14/14] ASoC: kirkwood: add IEC958 channel status support Russell King
2013-08-31 15:28 ` [PATCH 00/14] SPDIF support Lars-Peter Clausen
2013-08-31 17:28   ` Mark Brown
2013-08-31 19:19     ` [alsa-devel] " Russell King - ARM Linux
2013-08-31 20:46       ` Lars-Peter Clausen
2013-08-31 21:05         ` Russell King - ARM Linux
2013-08-31 22:23           ` Russell King - ARM Linux
2013-09-01 12:19           ` Mark Brown
2013-09-01 12:34             ` Russell King - ARM Linux
2013-09-01 13:02               ` Russell King - ARM Linux
2013-09-02 14:06               ` Mark Brown
2013-09-02 14:16                 ` Russell King - ARM Linux
2013-09-02 16:27                   ` Mark Brown
2013-09-02 16:59                     ` Russell King - ARM Linux [this message]
2013-09-02 20:44                       ` Mark Brown
2013-09-02 21:18                         ` Russell King - ARM Linux
2013-09-02 22:35                           ` Mark Brown
2013-09-02 23:00                             ` Russell King - ARM Linux
2013-09-04 19:33                               ` Mark Brown
2013-09-01  6:42         ` Russell King - ARM Linux
2013-09-01  7:42           ` [alsa-devel] " Lars-Peter Clausen
2013-09-01  8:51             ` Russell King - ARM Linux
2013-09-01 10:08               ` Lars-Peter Clausen
2013-09-01 12:04                 ` Russell King - ARM Linux
2013-09-01 17:32                   ` Lars-Peter Clausen
2013-09-01 11:51               ` Mark Brown
2013-09-01 12:15                 ` Russell King - ARM Linux
2013-09-01 17:05                   ` Mark Brown
2013-08-31 19:14   ` Russell King - ARM Linux
2013-08-31 19:34     ` Russell King - ARM Linux
2013-09-02 14:47       ` Mark Brown
2013-09-02 14:52         ` Russell King - ARM Linux
2013-09-02 14:57           ` Russell King - ARM Linux
2013-09-02 16:41             ` Mark Brown
2013-08-31 20:45     ` Lars-Peter Clausen

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=20130902165932.GZ6617@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew@lunn.ch \
    --cc=broonie@kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=moinejf@free.fr \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).