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: Tue, 15 Mar 2016 19:13:36 +0300	[thread overview]
Message-ID: <56E834B0.5010808@mcsplus.ru> (raw)
In-Reply-To: <56E802D9.4040501@ti.com>

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.

15.03.2016 15:40, Peter Ujfalusi пишет:
> On 03/15/16 14:12, Timur Karaldin wrote:
>> Hi Peter!
>>
>> 14.03.2016 17:47, Peter Ujfalusi пишет:
>>> So the issue is that we have the DAPM switches controlling exactly the same
>>> registers. I believe if you would set the gain in a way that bit0 is 1, then
>>> DAPM will think that the path is disconnected. Also if you would set the
>>> gain and then mute and unmute the path you would have lost the gain you
>>> wanted to have.. The only way I can think of implementing these mixers is to
>>> have two sets of custom callbacks. one set is to set/get the gain and the
>>> other is to set/get the mute/disconnect on these. When the path is
>>> disconnected you should not write the gain change to the chip, but cache it
>>> and if the path is unmuted, you write the cached gain. When you mute the
>>> path you should take the set gain first, cache it, then disconnect the path.
>>> For these gains you should have DECLARE_TLV_DB_SCALE() and use
>>> SOC_SINGLE_TLV(). Make sure that the control name matches with the
>>> corresponding DAPM widget's name so ALSA can match them correctly.
>> That's not clear for me. As I understand, I need to create SOC_SINGLE_TLV()
>> for each gain I would like to change, with the same name as
>> SOC_DAPM_SINGLE_AIC3x (for example "Line1L Switch" for Line1) and make
>> callbacks with cached gain values. Am I right?
> Mostly yes, but you need to name the controls:
> existing switch + new gain control
> "Line1L Switch" + "Line1L Volume"
> "Line1R Switch" + "Line1R Volume"
>
> In this way alsamixer can combine them.
>
>> May be the better sollution is to change SOC_DAPM_SINGLE_AIC3x on/off switch
>> to other type with switch and gain control together? So it could have some
>> connected states with different gains and disconnected state (Something like
>> volume/mute control).
> Something based on SOC_DAPM_SINGLE_TLV should work. But that means again
> change in Kcontrol names.
>


-- 
С уважением,
Руководитель проектов
Морские комплексы и системы плюс
Каралдин Т.М.
----------------------------------------------------------------------------------
Best regards,
Projects director
Marine complexes and systems plus
Timur Karaldin

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

  reply	other threads:[~2016-03-15 16:13 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 [this message]
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
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=56E834B0.5010808@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.