[alsa-devel] [PATCH v5] ASoC: add RT286 CODEC driver

Bard Liao bardliao at realtek.com
Fri Mar 21 06:57:49 CET 2014

> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Tuesday, March 18, 2014 9:02 PM
> To: Bard Liao
> Cc: lgirdwood at gmail.com; alsa-devel at alsa-project.org; Flove; Oder Chiou;
> Gustaw Lewandowski
> Subject: Re: [PATCH v5] ASoC: add RT286 CODEC driver
> On Tue, Mar 18, 2014 at 12:41:41PM +0000, Bard Liao wrote:
> Please fix your mailer to word wrap within paragraphs, this will make your mail
> more legible.

Now I set 80 characters to wrap the text. Hope it can work.

> > A verb command contains three parts, NID, VID, and PID.
> > For example, if I want to unmute headphone, I should set:
> > VID = 3'h (Set Amplifier Gain)
> > NID = 22'h (headphone)
> > PID = b000'h (Set left, right output unmute)
> So VID+NID is an address and PID is a value?

For I2C write, yes.
But for I2C read, I think PID is also a part of address. Because PID is meaningful in the I2C read protocol.
For example, if we need to get the mute/unmute status of headphone, we need to set:
VID = b'h (Get Amplifier Gain)
NID = 22'h (Headhoone)
PID = a000'h (Left output amplifier gain is requested)
And we can get response from rt286.

I am trying to implement my reg_write and reg_read to:
reg_write: address: VID+NID, value: PID
reg_read: address: VID+NID+PID, value: the responding data from rt286.


More information about the Alsa-devel mailing list