[alsa-devel] [PATCH] ASoC: cs42l51: Fix SOC_DOUBLE_R_SX_TLV shift values for ADC, PCM, and Analog kcontrols
Austin, Brian
Brian.Austin at cirrus.com
Fri Apr 18 14:22:27 CEST 2014
On Apr 18, 2014, at 4:23 AM, Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
> Dear Brian Austin,
>
> On Thu, 17 Apr 2014 10:08:23 -0500, Brian Austin wrote:
>
>> can you try this quick check please?
>>
>> static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
>> SOC_DOUBLE_R_SX_TLV("PCM Playback Volume",
>> CS42L51_PCMA_VOL, CS42L51_PCMB_VOL,
>> - 0, 0x19, 0x7F, adc_pcm_tlv),
>> + 0, 0x19, 0x80, adc_pcm_tlv),
>> SOC_DOUBLE_R("PCM Playback Switch",
>> CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1),
>> SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
>> CS42L51_AOUTA_VOL, CS42L51_AOUTB_VOL,
>> - 0, 0x34, 0xE4, aout_tlv),
>> + 0, 0x34, 0xE5, aout_tlv),
>> SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
>> CS42L51_ADCA_VOL, CS42L51_ADCB_VOL,
>> - 0, 0x19, 0x7F, adc_pcm_tlv),
>> + 0, 0x19, 0x80, adc_pcm_tlv),
>> SOC_DOUBLE_R("ADC Mixer Switch",
>> CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1),
>> SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1,
>> 0),
>
> Unfortunately, it still doesn't work: at boot time the PCM and ADC
> mixer values are 100 which looks OK, but the Analog value is 170, which
> doesn't look ok. And inspecting the values set at the register level
> for the PCM control seems to reveal that things are still not working
> correctly (read on below).
>
> But this time around, I've collected a lot of debugging informations,
> which hopefully will help understand the problem. My understanding is
> that:
>
> SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
> CS42L51_AOUTA_VOL, CS42L51_AOUTB_VOL,
> 0, 0x34, 0xE5, aout_tlv),
>
> cannot work, because it assumes that the range -102.0 dB to 12.0 dB
> described in the datasheet is represented by using register values from
> 0x34 to 0xE5. Which misses the fact that when going from -102.0 dB to 0
> dB, the register value goes from 0x34 to 0, and then when going from 0
> to 12.0 dB, the register value should go from 0 to 0xE5.
>
>
Ok, Thanks for the output.
Something is for sure broken, but I could have sworn I checked this. I’ll hook up my L51 board today and see what the deal is.
Thanks,
Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140418/74c9a429/attachment.sig>
More information about the Alsa-devel
mailing list