Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936655AbdGTR1O (ORCPT ); Thu, 20 Jul 2017 13:27:14 -0400 Received: from mail-ua0-f169.google.com ([209.85.217.169]:38500 "EHLO mail-ua0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936640AbdGTR1N (ORCPT ); Thu, 20 Jul 2017 13:27:13 -0400 MIME-Version: 1.0 In-Reply-To: <3b154ab9-6bbd-eb53-05e6-6d08cf3cc5c0@g0hl1n.net> References: <1497337054-4911-1-git-send-email-richard.leitner@skidata.com> <3b154ab9-6bbd-eb53-05e6-6d08cf3cc5c0@g0hl1n.net> From: Fabio Estevam Date: Thu, 20 Jul 2017 14:27:11 -0300 Message-ID: Subject: Re: [alsa-devel] [PATCH v3] ASoC: sgtl5000: add avc support To: Richard Leitner Cc: Richard Leitner , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Clemens Gruber , kalle.kankare@vincit.fi, Eric Nelson , "alsa-devel@alsa-project.org" , linux-kernel , Fabio Estevam Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 31 Hi Richard, On Thu, Jul 20, 2017 at 2:25 PM, Richard Leitner 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;