[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5Cp7keQSEcR+wV_Z6PTxYgr_xYxdcG_TDd+UUJne0R7xg@mail.gmail.com>
Date: Thu, 20 Jul 2017 14:27:11 -0300
From: Fabio Estevam <festevam@...il.com>
To: Richard Leitner <dev@...l1n.net>
Cc: Richard Leitner <richard.leitner@...data.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Clemens Gruber <clemens.gruber@...ruber.com>,
kalle.kankare@...cit.fi, Eric Nelson <eric@...int.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Fabio Estevam <fabio.estevam@....com>
Subject: Re: [alsa-devel] [PATCH v3] ASoC: sgtl5000: add avc support
Hi Richard,
On Thu, Jul 20, 2017 at 2:25 PM, Richard Leitner <dev@...l1n.net> wrote:
> Does this occur only on reboot or everytime the driver tries to read the AVC
> threshold (avc_get_threshold)?
> Are you able to set the AVC threshold (using amixer)?
I am not even using the codec. I just run 'reboot' and the problem happens.
The following change fixes the 'reboot' issue for me. Could you please try it?
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -409,7 +409,7 @@ static int dac_put_volsw(struct snd_kcontrol *kcontrol,
static int avc_get_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db, i;
u16 reg = snd_soc_read(codec, SGTL5000_DAP_AVC_THRESHOLD);
@@ -442,7 +442,7 @@ static int avc_get_threshold(struct snd_kcontrol *kcontrol,
static int avc_put_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db;
u16 reg;
Powered by blists - more mailing lists