From: Ricard Wanderlof <ricard.wanderlof@axis.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH v2] ASoC: Handle multiple codecs with split playback / capture
Date: Fri, 21 Aug 2015 09:11:16 +0200 [thread overview]
Message-ID: <alpine.DEB.2.02.1508210849260.10202@lnxricardw1.se.axis.com> (raw)
In-Reply-To: <55D5F611.9090205@linux.intel.com>
On Thu, 20 Aug 2015, Pierre-Louis Bossart wrote:
> > /**
> > * snd_soc_runtime_activate() - Increment active count for PCM runtime components
> > * @rtd: ASoC PCM runtime that is activated
> > @@ -371,6 +389,20 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_substream *substream)
> >
> > /* first calculate min/max only for CODECs in the DAI link */
> > for (i = 0; i < rtd->num_codecs; i++) {
> > +
> > + /*
> > + * Skip CODECs which don't support the current stream type.
> > + * Otherwise, since the rate, channel, and format values will
> > + * zero in that case, we would have no usable settings left,
> > + * causing the resulting setup to fail.
> > + * At least one CODEC should match, otherwise we should have
> > + * bailed out on a higher level, since there would be no
> > + * CODEC to support the transfer direction in that case.
> > + */
> > + if (!snd_soc_dai_stream_valid(rtd->codec_dais[i],
> > + substream->stream))
>
> Maybe I misunderstood but shouldn't there be some sort of verification
> that the codecs can use the same number of slots between playback and
> capture if they share the same LRCLK/FS? e.g. it's not uncommon to have
> 4 mic capture and 2 ch playback. If the capture and playback is handled
> by different chips you'd still need to maintain some level of consistency.
You're probably right, although it may be that that sort of thing is
handled at a higher level, e.g. the machine driver in such a setup would
configure both codecs to use TDM before we even get to this function, I
don't know.
I think we'd have to take care of that situation if and when it arises.
The setup I have here doesn't allow me to test it.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
next prev parent reply other threads:[~2015-08-21 7:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 15:32 [PATCH v2] ASoC: Handle multiple codecs with split playback / capture Ricard Wanderlof
2015-08-20 15:45 ` Pierre-Louis Bossart
2015-08-20 17:10 ` Mark Brown
2015-08-21 7:11 ` Ricard Wanderlof [this message]
[not found] ` <55D72E1B.2040109@linux.intel.com>
2015-08-21 14:05 ` Ricard Wanderlof
2015-09-03 15:05 ` Ricard Wanderlof
2015-09-03 15:18 ` Mark Brown
2015-09-03 15:59 ` Ricard Wanderlof
2015-09-03 16:24 ` Mark Brown
2015-09-20 0:13 ` Applied "ASoC: Handle multiple codecs with split playback / capture" to the asoc tree Mark Brown
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=alpine.DEB.2.02.1508210849260.10202@lnxricardw1.se.axis.com \
--to=ricard.wanderlof@axis.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=pierre-louis.bossart@linux.intel.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.