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!

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@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