[PATCH v3 4/5] ASoC: tda998x: adjust the audio hw parameters from EDID (original) (raw)

Jean-Francois Moine moinejf at free.fr
Wed Feb 5 01:11:34 PST 2014


On Tue, 4 Feb 2014 18:06:25 +0000 Mark Brown <broonie at kernel.org> wrote:

On Mon, Jan 27, 2014 at 09:48:54AM +0100, Jean-Francois Moine wrote:

> + /* change the sndsocpcmstream values of the driver */ > + stream->rates = ratemask; > + stream->channelsmax = maxchannels; > + stream->formats = formats; > + /* copy the DAI driver to a writable area */ > + daidrv = devmkzalloc(&pdev->dev, sizeof(tda998xdai), GFPKERNEL); > + if (!daidrv) > + return -ENOMEM; > + memcpy(daidrv, tda998xdai, sizeof(tda998xdai)); > + 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/



More information about the dri-devel mailing list