alsa-devel.alsa-project.org archive mirror
 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 15:12:44 +0300	[thread overview]
Message-ID: <56E7FC3C.1030503@mcsplus.ru> (raw)
In-Reply-To: <56E6CEE9.5030802@ti.com>

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?
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).

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

  parent reply	other threads:[~2016-03-15 12:12 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 [this message]
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
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=56E7FC3C.1030503@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).