[alsa-devel] [PATCH] ASoC: soc-io: Only force use regmap if the codec have it implemented

Peter Ujfalusi peter.ujfalusi at ti.com
Wed Aug 1 15:09:30 CEST 2012


On 08/01/2012 03:40 PM, Mark Brown wrote:
> You're changing the function setting up register I/O to ignore what's
> being set.  This is silly - the soc-io code is doing exactly the right
> thing here.

Well, it overrides the codec->read/write/bulk_write_raw callbacks, sets the
codec->using_regmap to true regardless if the codec have regmap or not.
It should only do all of these if the regmap is there IMHO.

The soc-core calls snd_soc_codec_set_cache_io() if codec->control_data is NULL
at the moment.

Reverting commit
38cbf95 ASoC: core: Try to use regmap if the driver doesn't set up any I/O
would fix the issue as well without changing the soc-io file.

We can as well return if the codec does not have the regmap and
snd_soc_codec_set_cache_io() fails in the SND_SOC_REGMAP case.

-- 
Péter


More information about the Alsa-devel mailing list