From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Dave Airlie <airlied@gmail.com>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Rob Clark <robdclark@gmail.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID
Date: Wed, 5 Feb 2014 10:11:34 +0100 [thread overview]
Message-ID: <20140205101134.4591e5c3@armhf> (raw)
In-Reply-To: <20140204180625.GM22609@sirena.org.uk>
On Tue, 4 Feb 2014 18:06:25 +0000
Mark Brown <broonie@kernel.org> wrote:
> On Mon, Jan 27, 2014 at 09:48:54AM +0100, Jean-Francois Moine wrote:
>
> > + /* change the snd_soc_pcm_stream values of the driver */
> > + stream->rates = rate_mask;
> > + stream->channels_max = max_channels;
> > + stream->formats = formats;
>
> > + /* copy the DAI driver to a writable area */
> > + dai_drv = devm_kzalloc(&pdev->dev, sizeof(tda998x_dai), GFP_KERNEL);
> > + if (!dai_drv)
> > + return -ENOMEM;
> > + memcpy(dai_drv, tda998x_dai, sizeof(tda998x_dai));
> > +
>
> The code should be doing this by setting constraints based on the
> current setup rather than by editing the data structure - the expecation
> is very much that the data won't change so this prevents surprises with
> future work on the core.
As it is done in the soc core, in soc_pcm_open(), the runtime hw_params
are initialized after the call to the CODEC startup, and the next CODEC
event is hw_params() when the user has already chosen all the parameters.
So, in the CODEC, I don't see how I could update the parameters
dictated by the EDID otherwise in changing the DAI driver parameters.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
next prev parent reply other threads:[~2014-02-05 9:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 17:10 [PATCH v3 0/5] add a TDA998x CODEC Jean-Francois Moine
2014-01-26 18:02 ` [PATCH v3 1/5] drm/i2c: tda998x: add a function for dynamic audio input switch Jean-Francois Moine
2014-01-26 18:45 ` [PATCH v3 2/5] ASoC: tda998x: add a codec driver for the TDA998x Jean-Francois Moine
2014-02-04 13:30 ` Mark Brown
2014-02-04 13:36 ` [alsa-devel] " Lars-Peter Clausen
2014-02-04 17:46 ` Mark Brown
2014-02-04 17:16 ` Jean-Francois Moine
2014-02-04 17:54 ` Mark Brown
2014-02-04 18:59 ` Jean-Francois Moine
2014-02-04 19:40 ` Mark Brown
2014-01-27 8:48 ` [PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID Jean-Francois Moine
2014-02-04 18:06 ` Mark Brown
2014-02-05 9:11 ` Jean-Francois Moine [this message]
2014-02-05 9:19 ` [alsa-devel] " Lars-Peter Clausen
2014-02-05 11:18 ` Mark Brown
2014-02-05 13:31 ` Lars-Peter Clausen
2014-02-05 14:08 ` Mark Brown
2014-02-05 18:07 ` Jean-Francois Moine
2014-02-05 18:21 ` Lars-Peter Clausen
2014-01-30 11:08 ` [PATCH v3 5/5] ASoC: tda998x: adjust the audio CTS_N pre-divider from audio format Jean-Francois Moine
2014-02-04 18:09 ` Mark Brown
2014-02-01 16:48 ` [PATCH v3 3/5] ASoC: tda998x: add DT documentation of the tda998x CODEC Jean-Francois Moine
2014-02-01 18:30 ` Sergei Shtylyov
2014-02-04 18:12 ` Mark Brown
2014-02-04 19:02 ` Jean-Francois Moine
2014-02-04 19:54 ` 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=20140205101134.4591e5c3@armhf \
--to=moinejf@free.fr \
--cc=airlied@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=robdclark@gmail.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 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).