From patchwork Thu Jan 15 11:52:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 5638771 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97E83C058D for ; Thu, 15 Jan 2015 11:54:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D529420160 for ; Thu, 15 Jan 2015 11:54:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AEE9220158 for ; Thu, 15 Jan 2015 11:54:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CABBF2655B6; Thu, 15 Jan 2015 12:54:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 5CC512606EA; Thu, 15 Jan 2015 12:52:35 +0100 (CET) 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 67BE226059D; Thu, 15 Jan 2015 12:52:33 +0100 (CET) Received: from smtp-out-247.synserver.de (smtp-out-247.synserver.de [212.40.185.247]) by alsa0.perex.cz (Postfix) with ESMTP id 622F326055F for ; Thu, 15 Jan 2015 12:52:23 +0100 (CET) Received: (qmail 9178 invoked by uid 0); 15 Jan 2015 11:52:20 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 8899 Received: from p4fc46079.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.196.96.121] by 217.119.54.96 with SMTP; 15 Jan 2015 11:52:19 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Thu, 15 Jan 2015 12:52:01 +0100 Message-Id: <1421322737-19077-2-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1421322737-19077-1-git-send-email-lars@metafoo.de> References: <1421322737-19077-1-git-send-email-lars@metafoo.de> Cc: Oder Chiou , alsa-devel@alsa-project.org, Lars-Peter Clausen , Jyri Sarha , Peter Ujfalusi , Bard Liao , Misael Lopez Cruz Subject: [alsa-devel] [PATCH 01/17] ASoC: mioa701_wm9713: Fix speaker event 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Commit f6b2a04590bb ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM setup") converted the driver to register the board level DAPM elements with the card's DAPM context rather than the CODEC's DAPM context. The change overlooked that the speaker widget event callback accesses the widget's codec field which is only valid if the widget has been registered in a CODEC DAPM context. This patch modifies the callback to take an alternative route to get the CODEC. Fixes: f6b2a04590bb ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM setup") Signed-off-by: Lars-Peter Clausen --- sound/soc/pxa/mioa701_wm9713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 396dbd5..a9615a57 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c @@ -81,7 +81,7 @@ static int rear_amp_power(struct snd_soc_codec *codec, int power) static int rear_amp_event(struct snd_soc_dapm_widget *widget, struct snd_kcontrol *kctl, int event) { - struct snd_soc_codec *codec = widget->codec; + struct snd_soc_codec *codec = widget->dapm->card->rtd[0].codec; return rear_amp_power(codec, SND_SOC_DAPM_EVENT_ON(event)); }