All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org, Jyri Sarha <jsarha@ti.com>
Subject: Re: [alsa-devel] [PATCH v2 3/3] ASoC: add generic dt-card support
Date: Tue, 3 Feb 2015 20:31:30 +0100	[thread overview]
Message-ID: <20150203203130.5d1cfc42@armhf> (raw)
In-Reply-To: <20150203164748.GR21293@sirena.org.uk>

On Tue, 3 Feb 2015 16:47:48 +0000
Mark Brown <broonie@kernel.org> wrote:

> On Sat, Jan 24, 2015 at 08:30:27AM +0100, Jean-Francois Moine wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> > > On Fri, Jan 23, 2015 at 07:34:56PM +0100, Jean-Francois Moine wrote:
> 
> > > > The simple card builder, 'dt-card' (maybe a better name would have been
> > > > 'graph-card'), acts just like the simple-card except that it does not
> > > > appear in the DT. Its creation is done by an audio controller.
> 
> > > Which audio controller?  There may be several CPU side audio interfaces
> > > in the same card.  For example people often want to have both low
> > > latency and high latency audio paths from the CPU into the hardware (low
> > > latency tends to increase power burn).  SoC centric system designs do
> > > sometimes also have PDM I/O, expecting to be directly connected to DMICs
> > > and so on, which results in a relatively large number of CPU interfaces.
> 
> > The audio controller which creates the card depends on the complexity
> > of the card. When there are many controllers, it is up to the designer
> > to define either a master audio controller or to instantiate a 'card'
> > device via the DT for doing the job.
> 
> So how does the simple controller interact with a more complex one given
> that it's somehow picking some controller node to start from?

A way to solve this problem could be to create only one card builder.
This creation could be explicit (created by the first active audio
controller) or implicit by the audio subsystem on the first controller or
CODEC creation.

Then, the card builder could scan all the DT looking for the audio
ports and create one or more cards according to the graph connectivity.

> > > > Well, forget about this. I never clearly understood why some widgets
> > > > and routes had to be defined at card level.
> 
> > > Please do try to understand the idea of representing simple components
> > > on the board and analogue interconects between devices - it's really
> > > important and not something that can be neglected.
> 
> > The problem is that this understanding would stay abstract: I have no
> > such a hardware. Anyway, if the representation can be done with the
> > simple-card, it may also be done with a graph of ports.
> 
> If you have a device with any sort of speaker or microphone, or any sort
> of external connector for interfacing with an external device like a
> headphone jack, then you have something that could be a widget.

I know what are the widgets and routes, I was just wondering why they
(especially the widgets) need to appear at the card level instead of
just being declared in the DAIs (from the platform or the DT).
And the same question may also be raised about the audio formats, clocks,
tdm's...

> > > That DT binding was done entirely in the context of video applications
> > > IIRC, this is the first time it's been discussed in this context.
> 
> > http://mailman.alsa-project.org/pipermail/alsa-devel/2014-January/070622.html
> > http://mailman.alsa-project.org/pipermail/alsa-devel/2015-January/086273.html
> 
> So there's been some in passing mentions, not really serious discussion
> though...

I may go back about the card builder, but Russell's idea about
declaring the tda998x audio parameters by a port as declared in a graph
of ports seems fine to me. This declaration should be compatible with
the use of the simple-card.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Kuninori Morimoto
	<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
Subject: Re: [alsa-devel] [PATCH v2 3/3] ASoC: add generic dt-card support
Date: Tue, 3 Feb 2015 20:31:30 +0100	[thread overview]
Message-ID: <20150203203130.5d1cfc42@armhf> (raw)
In-Reply-To: <20150203164748.GR21293-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

On Tue, 3 Feb 2015 16:47:48 +0000
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> On Sat, Jan 24, 2015 at 08:30:27AM +0100, Jean-Francois Moine wrote:
> > Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> > > On Fri, Jan 23, 2015 at 07:34:56PM +0100, Jean-Francois Moine wrote:
> 
> > > > The simple card builder, 'dt-card' (maybe a better name would have been
> > > > 'graph-card'), acts just like the simple-card except that it does not
> > > > appear in the DT. Its creation is done by an audio controller.
> 
> > > Which audio controller?  There may be several CPU side audio interfaces
> > > in the same card.  For example people often want to have both low
> > > latency and high latency audio paths from the CPU into the hardware (low
> > > latency tends to increase power burn).  SoC centric system designs do
> > > sometimes also have PDM I/O, expecting to be directly connected to DMICs
> > > and so on, which results in a relatively large number of CPU interfaces.
> 
> > The audio controller which creates the card depends on the complexity
> > of the card. When there are many controllers, it is up to the designer
> > to define either a master audio controller or to instantiate a 'card'
> > device via the DT for doing the job.
> 
> So how does the simple controller interact with a more complex one given
> that it's somehow picking some controller node to start from?

A way to solve this problem could be to create only one card builder.
This creation could be explicit (created by the first active audio
controller) or implicit by the audio subsystem on the first controller or
CODEC creation.

Then, the card builder could scan all the DT looking for the audio
ports and create one or more cards according to the graph connectivity.

> > > > Well, forget about this. I never clearly understood why some widgets
> > > > and routes had to be defined at card level.
> 
> > > Please do try to understand the idea of representing simple components
> > > on the board and analogue interconects between devices - it's really
> > > important and not something that can be neglected.
> 
> > The problem is that this understanding would stay abstract: I have no
> > such a hardware. Anyway, if the representation can be done with the
> > simple-card, it may also be done with a graph of ports.
> 
> If you have a device with any sort of speaker or microphone, or any sort
> of external connector for interfacing with an external device like a
> headphone jack, then you have something that could be a widget.

I know what are the widgets and routes, I was just wondering why they
(especially the widgets) need to appear at the card level instead of
just being declared in the DAIs (from the platform or the DT).
And the same question may also be raised about the audio formats, clocks,
tdm's...

> > > That DT binding was done entirely in the context of video applications
> > > IIRC, this is the first time it's been discussed in this context.
> 
> > http://mailman.alsa-project.org/pipermail/alsa-devel/2014-January/070622.html
> > http://mailman.alsa-project.org/pipermail/alsa-devel/2015-January/086273.html
> 
> So there's been some in passing mentions, not really serious discussion
> though...

I may go back about the card builder, but Russell's idea about
declaring the tda998x audio parameters by a port as declared in a graph
of ports seems fine to me. This declaration should be compatible with
the use of the simple-card.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-02-03 19:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 19:27 [PATCH v2 0/3] ASoC: add audio card creation from graph of ports in DT Jean-Francois Moine
2015-01-21 19:27 ` Jean-Francois Moine
2015-01-20 18:47 ` [PATCH v2 1/3] ASoC: core: export snd_soc_get_dai_name Jean-Francois Moine
2015-01-20 18:47   ` Jean-Francois Moine
2015-01-20 19:16 ` [PATCH v2 3/3] ASoC: add generic dt-card support Jean-Francois Moine
2015-01-20 19:16   ` Jean-Francois Moine
2015-01-21 20:14   ` [alsa-devel] " Lars-Peter Clausen
2015-01-21 20:14     ` Lars-Peter Clausen
2015-01-22  8:07     ` [alsa-devel] " Jean-Francois Moine
2015-01-22  8:07       ` Jean-Francois Moine
2015-01-22 19:00       ` Mark Brown
2015-01-22 19:25       ` Lars-Peter Clausen
2015-01-23 12:15         ` Jean-Francois Moine
2015-01-23 12:15           ` Jean-Francois Moine
2015-01-23 13:56           ` Lars-Peter Clausen
2015-01-23 13:56             ` Lars-Peter Clausen
2015-01-23 17:40             ` Mark Brown
2015-01-23 18:34             ` Jean-Francois Moine
2015-01-23 18:34               ` Jean-Francois Moine
2015-01-23 19:13               ` Mark Brown
2015-01-23 19:13                 ` Mark Brown
2015-01-24  7:30                 ` Jean-Francois Moine
2015-02-03 16:47                   ` Mark Brown
2015-02-03 19:31                     ` Jean-Francois Moine [this message]
2015-02-03 19:31                       ` Jean-Francois Moine
2015-02-07  8:33                       ` Mark Brown
2015-02-07  8:33                         ` Mark Brown
2015-01-24 11:27               ` Lars-Peter Clausen
2015-01-24 11:27                 ` Lars-Peter Clausen
2015-01-24 13:18                 ` Jean-Francois Moine
2015-01-24 13:18                   ` Jean-Francois Moine
2015-01-26 11:53                   ` Lars-Peter Clausen
2015-01-26 11:53                     ` Lars-Peter Clausen
2015-01-26 18:22                     ` Jean-Francois Moine
2015-01-21 19:10 ` [PATCH v2 2/3] Documentation: of: Document audio graph bindings Jean-Francois Moine

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=20150203203130.5d1cfc42@armhf \
    --to=moinejf@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jsarha@ti.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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.