From patchwork Thu Jul 20 17:27:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9855399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3DF7660392 for ; Thu, 20 Jul 2017 17:27:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 220FA28828 for ; Thu, 20 Jul 2017 17:27:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16C2B2882A; Thu, 20 Jul 2017 17:27:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5221E28828 for ; Thu, 20 Jul 2017 17:27:19 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 93A4C26741F; Thu, 20 Jul 2017 19:27:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C9702267420; Thu, 20 Jul 2017 19:27:15 +0200 (CEST) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com [209.85.217.170]) by alsa0.perex.cz (Postfix) with ESMTP id ED10D266CC9 for ; Thu, 20 Jul 2017 19:27:13 +0200 (CEST) Received: by mail-ua0-f170.google.com with SMTP id w45so28336237uac.5 for ; Thu, 20 Jul 2017 10:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4FbPnMXcCPO4yEr6cpgg/G3/PIu5MkzolUTVSrSs3+Q=; b=MY6k+xV4H62Jgt+0aNoJXo9kMPDAGzN0MkTihb+hfwoEz+LpnMwvvGeTOGH8q2ISbV 40owiwiin5Low4vqXSk5iHmFlRtIgHj/TheXrd8rOIZjoGaDc5yf6FvoTN5Sm3YG+hVU osrpG/HgKvL2RzoR2RS+aZ9dp5QGFE6H4cXAkCWSZK68K0WnQrIly7nYAoCO3dIDEX2f em3YDoaG+ijSoFjjCCmQ76SsgjCY33idGZ8N/ULD7xwwfxSgJYBBXII1jYH6j/jxky5E qQN2E7Wq0FfZIo3k5ODkAIG8F6r2jgW9p59dRMmvMV0gSaAl8ZZQ7Lb8DK89+WBVAntz DvpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4FbPnMXcCPO4yEr6cpgg/G3/PIu5MkzolUTVSrSs3+Q=; b=ihfCqyET0v8XMPXwlgY794Hk5V7siCMIIO/rY4KvfaH/SaGG8tWW6H0TgYqJn1gZUP jgV6dpFReUujjFsmNDqLhVm/wfyUBwMed/uyYNzyodpT0+Ti8mD6IxqupeL11sYL42wb s1VeWbr1k5ASP5lQpR7oMJbwfLbfoMxiWTz/dLr+DZcDOiIlN/5X8PBpUOGcpxVfFWzG 2PfkVMyIM5fnmFPoA2z8mfK+ZzDq2Ua5b4b5srQIgJ9a181Etly7EYnJ12sxK1jADlKH PYT94a5Ft9XOytmrYMdIgO0iE4XpiEyWthbl+HPgDByFlA9QdrOBMXPKp+GGDO40MIRo YIXQ== X-Gm-Message-State: AIVw112iSgQ3qfJrlxmugATP7zvjzbSurdDRjZdmE5VgDbx/EIHn+ERH 09vdNBNvPZmxkRVb2AYZmk7l/APIpg== X-Received: by 10.31.99.5 with SMTP id x5mr2079646vkb.62.1500571632333; Thu, 20 Jul 2017 10:27:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.204.1 with HTTP; Thu, 20 Jul 2017 10:27:11 -0700 (PDT) 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: To: Richard Leitner Cc: Clemens Gruber , kalle.kankare@vincit.fi, "alsa-devel@alsa-project.org" , Liam Girdwood , Eric Nelson , Takashi Iwai , Mark Brown , Fabio Estevam , linux-kernel , Richard Leitner Subject: Re: [alsa-devel] [PATCH v3] ASoC: sgtl5000: add avc support X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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? Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel --- 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; _______________________________________________