mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
audio: codec: the DAC gain set of acodec not work [1/1]
PD#SWPL-3134 Problem: the DAC gain set is not work Solution: update and aml_codec_tl1_acodec.c, change the method of getting codec pointer from kcontrol pointer. Verify: verify by T962x2_X301 board Change-Id: I02f02b73fab3b8391ef4866a71ffaf0d48bbbbbf Signed-off-by: Shuyu Li <shuyu.li@amlogic.com>
This commit is contained in:
@@ -129,7 +129,8 @@ static int aml_DAC_Gain_set_enum(
|
||||
struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
|
||||
u32 reg_addr = ACODEC_1;
|
||||
u32 val = snd_soc_read(codec, reg_addr);
|
||||
|
||||
@@ -177,7 +178,8 @@ static int aml_DAC2_Gain_set_enum(
|
||||
struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
|
||||
u32 reg_addr = ACODEC_7;
|
||||
u32 val = snd_soc_read(codec, reg_addr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user