alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Reichl <hias@horus.com>
To: Matt Flax <flatmax@flatmax.org>
Cc: alsa-devel@alsa-project.org,
	Stephen Warren <swarren@wwwdotorg.org>,
	Lee Jones <lee@kernel.org>,
	phil@raspberrypi.org, Liam Girdwood <lgirdwood@gmail.com>,
	Eric Anholt <eric@anholt.net>,
	florian.kauer@koalo.de, broonie@kernel.org,
	Florian Meier <florian.meier@koalo.de>,
	linux-rpi-kernel@lists.infradead.org,
	ckeepax@opensource.wolfsonmicro.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] ASoC: Enable a new IC master mode: bcm2835<=>IC<=>cs42xx8
Date: Mon, 27 Feb 2017 11:30:24 +0100	[thread overview]
Message-ID: <20170227103024.GF2718@delle.lan> (raw)
In-Reply-To: <170950f7-354f-e6a9-cefb-834a00fadd1b@flatmax.org>

On Mon, Feb 27, 2017 at 09:08:14PM +1100, Matt Flax wrote:
> 
> 
> On 27/02/17 19:04, Matthias Reichl wrote:
> >On Mon, Feb 27, 2017 at 09:35:14AM +1100, Matt Flax wrote:
> >>
> >>On 27/02/17 09:16, Matthias Reichl wrote:
> >>>
> >>>Have a look at the end of Documentation/sound/alsa/soc/DPCM.txt
> >>>where codec<->codec links are explained.
> >>>
> >>>You can setup the stream parameters for the "IC"<->"real codec" link
> >>>with snd_soc_dai_link.params.
> >>>
> >>>You can do that for example in your machine driver in hwparams:
> >>>when hw_params is called eg with 2 channels 192kHz just set the
> >>>dai link parameters of the codec to 8 channels 48kHz.
> >>>
> >>>Maybe using dynamic pcm (which offers a be_hw_params_fixup hook)
> >>>is the more appropriate way to do that, but I can't tell for sure
> >>>as I never used it and am not familiar with it.
> >>>
> >>>
> >>Thanks for this information, I will give this a go - seems a better way now
> >>then introducing an IC master into the mix !
> >>
> >>Do you agree that we still need the BCM2835 SoC CPU driver to be expanded to
> >>handle DSP mode
> >>and multichannel setups ? I can't see any other way to enable the
> >>multichannel hardware setup without altering bcm2835_i2s.c to handle DSP
> >>mode and more then 2 channels in its _hw_params.
> >No, DSP mode and multichannel don't work on the BCM2835. Keep the driver
> >as it is.
> >
> >Use the alsa plugin approach to tunnel multichannel data over a 2-channel
> >PCM and you don't need to modify existing drivers.
> >
> 
> Thanks again for this suggestion. I have been playing around with user space
> plugins lately, they are great. I plan to release some C++ classes to help
> trivialise the creation of such plugins.
> 
> However for a product, a piece of robustly functioning hardware, I am
> inclined to take the route of introducing a DSP mode into the bcm2835_i2s.c
> driver.

You can add DSP mode when you found which undocumented registers inside
the bcm2835 are needed to enable DSP mode, set channel 3-8 positions etc.
I'm not sure they exist, so there's little point in doing that - as we both
agreed, clocking the bcm2835 in DSP mode (while it's set up as a I2S slave)
doesn't work.

> From the previous patches, it is clear that people are willing to allow
> multichannel (DSP mode) into the bcm2835 CPU driver.

I don't see that. Some people might want to be able to use multichannel
on RPi, but that's something very different than adding code that just
lies about driver capabilites.

> It improves the
> usefulness of hardware which use the BCM2835 derived chipset. From my point
> of view that is a major simplification in terms of releasing functioning
> multichannel hardware. I would imagine from the manufacturer's point of view
> that is a big bonus too !
> 
> Again I intend to implement your concept of the snd_soc_dai_link for my
> machine driver, that is a fantasic lead you have given me ... when I have
> questions @ implementation time I will copy you in seeking for more
> guidance.
> 
> thanks again,
> Matt
> 
> 

  reply	other threads:[~2017-02-27 10:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25  5:03 [PATCH 0/3] ASoC: Enable a new IC master mode: bcm2835<=>IC<=>cs42xx8 Matt Flax
2017-02-25  5:03 ` [PATCH 1/3] ASoC : Add an IC bit and frame master mode (SoC and Codec slave) Matt Flax
2017-03-15 19:02   ` Mark Brown
2017-02-25  5:03 ` [PATCH 2/3] ASoC: cs42xx8: allow IC master mode Matt Flax
2017-02-25  5:03 ` [PATCH 3/3] ASoC: bcm2835: Add mutichannel mode in DSP and IC master modes Matt Flax
2017-02-25 13:39 ` [PATCH 0/3] ASoC: Enable a new IC master mode: bcm2835<=>IC<=>cs42xx8 Matthias Reichl
2017-02-25 22:13   ` Matt Flax
2017-02-26 14:49     ` Matthias Reichl
2017-02-26 20:21       ` Matt Flax
2017-02-26 22:16         ` Matthias Reichl
2017-02-26 22:35           ` Matt Flax
2017-02-27  8:04             ` Matthias Reichl
2017-02-27 10:08               ` Matt Flax
2017-02-27 10:30                 ` Matthias Reichl [this message]
2017-02-27 11:21                   ` Matt Flax
2017-02-27 11:51                     ` Matthias Reichl
2017-02-28  9:59                       ` Charles Keepax
2017-03-15 19:01                         ` Mark Brown
2017-03-16 20:51                           ` Matt Flax
2017-03-16 21:27                             ` Lars-Peter Clausen
2017-03-16 22:14                               ` Matt Flax
2017-03-21 21:21                                 ` Emmanuel Fusté
2017-03-21 22:11                                   ` Matthias Reichl
2017-03-21 23:29                                     ` Matt Flax
2017-03-22  9:43                                       ` Charles Keepax
2017-03-22 12:04                                         ` Matt Flax
2017-03-22 12:34                                           ` [alsa-devel] " Charles Keepax
2017-03-22 15:38                                           ` Stephen Warren
2017-03-24 19:11                                             ` Mark Brown
2017-03-24 19:09                                           ` Mark Brown
2017-03-25  5:45                                             ` Matt Flax
2017-03-27 10:01                                               ` Mark Brown
2017-03-27 10:35                                                 ` Matt Flax
2017-03-27 11:30                                                   ` Mark Brown
2017-03-26 19:02                                     ` Emmanuel Fusté
2017-02-28 10:10         ` Charles Keepax
2017-02-26 20:41       ` Emmanuel Fusté
2017-02-26 21:44         ` Matt Flax
2017-02-26 22:49           ` Emmanuel Fusté
2017-02-27  9:14         ` Matthias Reichl
2017-02-27 18:19           ` Emmanuel Fusté
2017-02-27 19:12           ` Emmanuel Fusté

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=20170227103024.GF2718@delle.lan \
    --to=hias@horus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=eric@anholt.net \
    --cc=flatmax@flatmax.org \
    --cc=florian.kauer@koalo.de \
    --cc=florian.meier@koalo.de \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=phil@raspberrypi.org \
    --cc=swarren@wwwdotorg.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 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).