All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Sameer Pujar <spujar@nvidia.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	jonathanh@nvidia.com
Subject: Re: More Generic Audio Graph Sound Card idea
Date: Fri, 25 Sep 2020 15:04:37 -0500	[thread overview]
Message-ID: <aceb1334-9b3f-7a62-60e9-6028059d4bf7@linux.intel.com> (raw)
In-Reply-To: <20200925192202.GA9831@sirena.org.uk>



On 9/25/20 2:22 PM, Mark Brown wrote:
> On Fri, Sep 25, 2020 at 10:43:59AM +0900, Kuninori Morimoto wrote:
> 
>> But multi-Codec side is difficult.
>> Because it is selected via "endpoint" via CPU.
>> No way to select it via "port" and/or "ports".
> 
> Indeed.
> 
>> We might want to select Multi-CPU/Codec by using multi deivces ?
>> in such case, using "ports" idea is not enough.
> 
>> Using extra device like DSP can be more generic ?
> 
>> 	<--- multi-CPU --->
>> 	            *******
>> 	CPU0-1 <--> *     * <--> Codec0
>> 	CPU0-2 <--> *     *
>> 	CPU0-3 <--> *     *
>> 	            *******
> 
> I think this is what we want for SoCs, represent the DSPs explicitly and
> then have the FEs and BEs all be ports on the DSP.  I think a similar
> thing would also work for legacy (I2S & so on) DAIs where we've got more
> endpoints on the DAI - if we define slots on the DAI then from the point
> of view of the DT bindings it's just a very, very inflexible DSP:
> 
>          CPU1 <--> DAI slot A <--> Codec1-1
>                \-> DAI slot B <--> Codec1-2
>          CPU2 <--> DAI slot C <--> Codec1-3
> 
> or whatever.  This doesn't allow for really complex setups that change
> the slot mapping at runtime (TBH those probably need custom cards
> anyway) but I think it should support most cases where TDM causes
> difficulties today.  I'm not sure if we need this for more modern buses
> like SoundWire, I'd hope we can dynamically assign slots at runtime more
> easily, but ICBW.

SoundWire doesn't have a notion of 'slot'. Instead you program the data 
ports for the type of audio data to be transmitted/received.

See some pointers at 
https://mipi.org/sites/default/files/MIPI-SoundWire-webinar-20150121-final.pdf
Pages 42-47 describe the main concepts.

The actual bit allocation can be done in different ways. On the Intel 
side, we use a dynamic allocation. It's my understanding that Qualcomm 
have a static allocation for their amplifier links.

In most cases, a sink port receives exactly what it needs, but for 
playback we have cases where all amplifiers receive the same data (we 
call this 'mirror mode', and each amplifier will be configured to render 
a specific channel from the data received. This is useful to deal with 
orientation/posture changes where the data transmitted on the wires 
doesn't need to be changed. This avoid dynamic re-configurations on the 
DSP + bus sides, only the amplifier settings need to be modified - 
typically via controls.

That said, the mapping of data ports between CPU and codec sides is 
rather static, mostly because devices typically dedicate specific data 
ports to specific functionality. SDCA will not change this, quite the 
opposite, the mapping between ports and audio functionality behind the 
port will be defined in platform firmware.

It's a bit of a stretch but conceptually there is some level of overlap 
between SoundWire data ports and TDM slots, e.g. if in a TDM link you 
used slots 4,5 for headset playback, you might use data port 2 on a 
SoundWire link. It's however a 'logical' mapping, the actual position of 
the bits in the frame is handled by the bit allocation.

Hope this helps!
-Pierre


  reply	other threads:[~2020-09-25 20:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  4:15 More Generic Audio Graph Sound Card idea Kuninori Morimoto
2020-08-21  5:26 ` Sameer Pujar
2020-08-21  7:14   ` Kuninori Morimoto
2020-08-21  8:28     ` Sameer Pujar
2020-08-21 13:02       ` Mark Brown
2020-09-25  1:43     ` Kuninori Morimoto
2020-09-25 19:22       ` Mark Brown
2020-09-25 20:04         ` Pierre-Louis Bossart [this message]
2020-09-25 20:10           ` Mark Brown
2020-09-25 20:50             ` Pierre-Louis Bossart
2020-08-21  7:11 ` Daniel Baluta
2020-08-21  7:25   ` Kuninori Morimoto
2020-08-21  7:33     ` Daniel Baluta
2020-08-21 11:47     ` Mark Brown
2020-08-21 12:18 ` Mark Brown
2020-08-24  0:25   ` Kuninori Morimoto
2020-08-24  6:25     ` Sameer Pujar
2020-08-25  0:59       ` Kuninori Morimoto
2020-08-25  3:11         ` Sameer Pujar
2020-08-25  5:13           ` Kuninori Morimoto
2020-08-25  5:42             ` Sameer Pujar
2020-08-25  6:35               ` Kuninori Morimoto
2020-08-26  6:46                 ` Sameer Pujar
2020-08-27  1:18                   ` Kuninori Morimoto
2020-08-27  1:36                   ` Kuninori Morimoto
2020-09-03 23:51     ` Kuninori Morimoto
2020-09-09 11:33       ` Sameer Pujar
2020-08-21 15:49 ` Pierre-Louis Bossart
2020-10-13  4:50 ` Kuninori Morimoto
2020-10-15 14:32   ` Mark Brown
2020-10-15 23:04     ` Kuninori Morimoto

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=aceb1334-9b3f-7a62-60e9-6028059d4bf7@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=spujar@nvidia.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 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.