Re: ASoC: TLV320AIC3x: Adding additional functionality for 3106 with [Patch] for discuss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter!

16.03.2016 11:57, Peter Ujfalusi пишет:
Hi Timur,

please avoid top posting.

On 03/15/16 18:13, Timur Karaldin wrote:
Ok, I choose the way #1 without changing kcontrol names.
Another thing I don't understand is the way for caching gain volume if I have
switches muted. Is there any proper way for storing cached values between gain
and switch handlers includes soft reset or I need manually check kcontrol name
in handler and cache values in extended private structure? The same question
for switch handler, because I need to share cached values between these handlers.
Since the problematic registers are: 17, 18, .. 24. I would have an array
inside struct aic3x_priv to store the configured gain. You could store the
mute as well, but since regmap is caching the content I would simply read back
the gain value and if it is 0xf, it is muted, so update only the local shadow,
if it is not muted, write the gain.
In the mute/unmute controls I would then save the gain to shadow when muting
the path and write the cached gain to the register when unmuting it. You
should also return correct 0/1 for the unmute state and not the actual
register value.
Actually I try to avoid complex handler, with switch-case which depends on reg number or kcontrol name inside of it. I have found similar discussion with you about one year ago here http://mailman.alsa-project.org/pipermail/alsa-devel/2015-February/087430.html. There is a proposal to use TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM() because of invert with SOC_DAPM_SINGLE_TLV. As I understand we could make tlv with using 0 as mute, skip values 1-6, use values 7-15 (7 = -12dB and 15=0dB) then declare SOC_DAPM_SINGLE_TLV as "Line1L Volume" for example. Is it still actual? Few things which I didn't understand: - should I use "Line1L Switch" together with "Line1L Volume" in this case. I think no, because DAPM_SINGLE_TLV should replace switch.
- i don't understand how declare tlv with skipping values 1-6

Cheers, Tim
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux