[alsa-devel] [PATCH] ASoC: factor out intel_scu_ipc related read/write

Lu Guanqun guanqun.lu at intel.com
Sat May 7 15:48:30 CEST 2011


Hi Mark,

How do you think of this approach?

Hi Vinod,

I don't have the mfld hardware, so it's a not tested patch. I want your
ack or dis-ack on this. :)

> +	case SND_SOC_INTEL_SCU:
> +		if (io_types[i].addr_bits != 16 || io_types[i].data_bits != 8)
> +			return -EINVAL;
> +
> +		codec->hw_read = snd_soc_16_8_intel_scu_read;
> +		codec->hw_write = snd_soc_16_8_intel_scu_write;
> +		codec->control_data = codec;

Another way to do this to simply override codec->read and codec->write
with the intel_scu_read/write stuff.  But then I realize we may later
take advantage of soc cache, therefore it's not appropriate to simply
override these two operations.

-- 
guanqun


More information about the Alsa-devel mailing list