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: Fri, 18 Mar 2016 18:45:58 +0300 [thread overview]
Message-ID: <56EC22B6.70100@mcsplus.ru> (raw)
In-Reply-To: <56EA7833.7080302@ti.com>
Hi Peter!
17.03.2016 12:26, Peter Ujfalusi пишет:
>> 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?
> All cached registers are going to be restored after power on with exception of
> volatile registers. You need to restore the bits in a volatile registers in
> the driver.
>
I'm very close to patch v2, but I have some problems with
misunderstanding the key moment with dapm handler
snd_soc_dapm_put_volsw_aic3x I think.
I successfuly wrote put/get handlers for DOUBLE_R_EXT_TLV and
SINGLE_EXT_TLV volume controls using snd_kcontrol_chip and
snd_soc_codec_get_drvdata function for accessing codec's private data.
It's work. But any attempts in snd_soc_dapm_put_volsw_aic3x to get priv
data aix3x_priv* make kernel error: Unable to handle kernel NULL
pointer dereference at virtual address 0000009e. If I remove
snd_soc_codec_get_drvdata call and accessing to cached regs it's become
normal again.
Currently I use kernel 3.15 and there is some example in wm8903.c
static int wm8903_class_w_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec =
snd_soc_dapm_kcontrol_codec(kcontrol);
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
...
and it's look ok, and I hope it's working, but not good for me in
snd_soc_dapm_put_volsw_aic3x handler.
Do you have any idea or any tips I should keep in mind, when working in
DAPM context?
Cheers, Tim
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2016-03-18 15:46 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
2016-03-17 9:26 ` Peter Ujfalusi
2016-03-18 15:45 ` Timur Karaldin [this message]
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=56EC22B6.70100@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).