All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Karaldin <karaldin@mcsplus.ru>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>, alsa-devel@alsa-project.org
Subject: Re: ASoC: TLV320AIC3x: Adding additional functionality for 3106 with [Patch] for discuss
Date: Wed, 16 Mar 2016 19:53:45 +0300	[thread overview]
Message-ID: <56E98F99.2060100@mcsplus.ru> (raw)
In-Reply-To: <56E97A75.7030700@ti.com>

16.03.2016 18:23, Peter Ujfalusi пишет:
> On 03/16/2016 12:26 PM, Timur Karaldin wrote:
>> 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.
> your mail client does not seem to wrap the lines correctly, can you check that.
I have no idea how these lines should looks, so it's very hard for me to 
see what's wrong. Could you point me how it looks in original?
>
>> 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 recall there were some issues with that back then, but can not recall. At
> least I don't see followup patches regarding to that.
>
>> 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?
> Worth a try ;)
> The naming needs to be different, take a look at twl4030 codec's
> twl4030_dapm_dbypass_tlv and how it is used.
>
>> 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.
> Since we will have the gain and mute with volume control we will have only one
> control.
>
>> - i don't understand how declare tlv with skipping values 1-6
> Yeah, I'm not sure how leaving 'hole' between the TLV_DB_SCALE_ITEMs will be
> handled if it works.
>
>> Cheers, Tim
Ok, now it's much more clear for me.
Another question is register behaviour during soft reset. There is 
"aic3x_set_power" handle. In this handle kernel makes SOFT_RESET, markes 
cache as dirty, then power down the codec for handle power down request.
But as I could see main volumes like "HP DAC" and "PCM" stores values 
between close and open in mixer and I could not see any code to handle 
it. On the other hand my controls do not save states, as you mentioned 
because of SOFT_RESET, could you explain such different behaviour?

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

  reply	other threads:[~2016-03-16 16:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 11:06 ASoC: TLV320AIC3x: Adding additional functionality for 3106 with [Patch] for discuss Timur Karaldin
2016-03-14 14:47 ` Peter Ujfalusi
     [not found]   ` <56E6D177.5050108@mcsplus.ru>
2016-03-14 16:38     ` Peter Ujfalusi
2016-03-15 10:17       ` Timur Karaldin
2016-03-15 11:47         ` Peter Ujfalusi
2016-03-15 12:12   ` Timur Karaldin
2016-03-15 12:40     ` Peter Ujfalusi
2016-03-15 16:13       ` Timur Karaldin
2016-03-16  8:57         ` Peter Ujfalusi
2016-03-16 10:26           ` Timur Karaldin
2016-03-16 15:23             ` Peter Ujfalusi
2016-03-16 16:53               ` Timur Karaldin [this message]
2016-03-17  9:26                 ` Peter Ujfalusi
2016-03-18 15:45                   ` Timur Karaldin
2016-03-23 15:21                   ` Timur Karaldin
2016-03-31 12:58                     ` Peter Ujfalusi
2016-04-18 16:28                       ` [PATCH V2 1/2] ASoC: TLV320AIC3x: Adding additional functionality for 3106 Timur Karaldin
2016-04-18 16:28                       ` [PATCH V2 2/2] " Timur Karaldin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E98F99.2060100@mcsplus.ru \
    --to=karaldin@mcsplus.ru \
    --cc=alsa-devel@alsa-project.org \
    --cc=peter.ujfalusi@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.