[alsa-devel] [PATCH] ASoC: rt5677: Use specific r/w function for DSP mode

Oder Chiou oder_chiou at realtek.com
Mon Nov 3 03:31:41 CET 2014


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Saturday, November 01, 2014 1:52 AM
> To: Oder Chiou
> Cc: lgirdwood at gmail.com; alsa-devel at alsa-project.org; Bard Liao; Flove;
> anatol at google.com; benzh at google.com
> Subject: Re: [PATCH] ASoC: rt5677: Use specific r/w function for DSP mode
> 
> On Wed, Oct 29, 2014 at 01:44:57AM +0000, Oder Chiou wrote:
> 
> > > This looks like standard regmap stuff - what's different?
> 
> > They are not different with regmap stuff, but they are called by
> > rt5677_dsp_mode_i2c_write_addr(), rt5677_dsp_mode_i2c_read_addr(),
> > rt5677_read() and rt5677_write().
> 
> > The customize access function is implemented by rt5677_read() and
> > rt5677_write() that are assigned to regmap_config "rt5677_regmap" for
> > using between codec mode or DSP mode.
> 
> Sorry, I'm not quite following what you're saying here - if you're saying that they're
> slightly different to the main register map I/O for this device then it's OK to create
> two regmaps and only access the DSP one through separate functions.
> 
Sorry for my weak explanations. In this codec, there are 2 access modes, and it
only can be chosen one mode at the same time. In codec mode, we use the normal
access method to access codec settings, and in DSP mode, we also can access the
codec settings, but it should use the method of memory address map to access.
Ex. If we want to access the MX-01 in the DSP mode, we need to convert to
memory address 0x18020000 + (01 * 2). We want to use the same regmap table to
handle the codec settings, so the customize r/w functions are needed in it.
In the DSP mode, the registers MX-00 ~ MX-04 are used for DSP address access,
so it also need the native function to avoid the regmap handle, thanks.


More information about the Alsa-devel mailing list