From: Jian Xu Date: Mon, 27 May 2019 11:35:58 +0000 (+0800) Subject: audio: meson: fix internal codec mixer api call [1/1] X-Git-Tag: hardkernel-4.9.236-104~1168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06a33222b07826d71e2e2cd181e764e3876068d0;p=platform%2Fkernel%2Flinux-amlogic.git audio: meson: fix internal codec mixer api call [1/1] PD#TV-6267 Problem: internal codec pointer operation error Solution: use 4.9 ALSA standard API to get the codec handle. Verify: R311 Change-Id: I52567a914230083054dc0413f818356d71c83a53 Signed-off-by: Jian Xu --- diff --git a/sound/soc/codecs/amlogic/aml_codec_txlx_acodec.c b/sound/soc/codecs/amlogic/aml_codec_txlx_acodec.c index 9261ddb..024323e 100644 --- a/sound/soc/codecs/amlogic/aml_codec_txlx_acodec.c +++ b/sound/soc/codecs/amlogic/aml_codec_txlx_acodec.c @@ -93,7 +93,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 add = ADC_VOL_CTR_PGA_IN_CONFIG; u32 val = snd_soc_read(codec, add);