From patchwork Fri Jan 26 15:25:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10186393 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 EB2B960383 for ; Fri, 26 Jan 2018 15:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB1D6297CB for ; Fri, 26 Jan 2018 15:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF40F29C3A; Fri, 26 Jan 2018 15:26:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,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 B6B20297CB for ; Fri, 26 Jan 2018 15:26:14 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CDCF52676A2; Fri, 26 Jan 2018 16:26:00 +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 4E0FB26769D; Fri, 26 Jan 2018 16:25:57 +0100 (CET) Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 3D5D126769C for ; Fri, 26 Jan 2018 16:25:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=F0LvBx+cJwWA8yG+Q/KEcsKeM+oSQafvV51CSdufoOY=; b=K0xrvzSICtXj aP8S/kZgOkYJ56MzQPBQf2978nhHfiWIFTT7NpkaVY5I8ASyiEFpId9U4BoiwnHcwi1VUn1lsLdV6 vUflzuusp07pAVi4NyfTUSU1U0vIdNQ69WdIoU26SABwzQYgitCiYnaKzasAbiIH9vjI/1LemxuwH PHO9U=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ef5sq-0007DR-JZ; Fri, 26 Jan 2018 15:25:40 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1ef5sq-0006XX-4C; Fri, 26 Jan 2018 15:25:40 +0000 From: Mark Brown To: Charles Keepax In-Reply-To: <20180126130845.7122-3-ckeepax@opensource.cirrus.com> Message-Id: Date: Fri, 26 Jan 2018 15:25:40 +0000 Cc: alsa-devel@alsa-project.org, ladis@linux-mips.org, kuninori.morimoto.gx@renesas.com, vinod.koul@intel.com, lgirdwood@gmail.com, broonie@kernel.org, dan.carpenter@oracle.com Subject: [alsa-devel] Applied "ASoC: compress: Fixup error messages" to the asoc tree 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 The patch ASoC: compress: Fixup error messages has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 141dfc9e3751f5f245fa71416d03511b05f4e1de Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Fri, 26 Jan 2018 13:08:45 +0000 Subject: [PATCH] ASoC: compress: Fixup error messages The error message prints are a little inconsisent, tidy them up to be a little more consistent with current style recommendations. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/soc-compress.c | 68 +++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index b1cf758e3be2..82402688bd8e 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -40,7 +40,8 @@ static int soc_compr_open(struct snd_compr_stream *cstream) if (cpu_dai->driver->cops && cpu_dai->driver->cops->startup) { ret = cpu_dai->driver->cops->startup(cstream, cpu_dai); if (ret < 0) { - dev_err(cpu_dai->dev, "Compress ASoC: can't open interface %s: %d\n", + dev_err(cpu_dai->dev, + "Compress ASoC: can't open interface %s: %d\n", cpu_dai->name, ret); goto out; } @@ -49,8 +50,9 @@ static int soc_compr_open(struct snd_compr_stream *cstream) if (platform && platform->driver->compr_ops && platform->driver->compr_ops->open) { ret = platform->driver->compr_ops->open(cstream); if (ret < 0) { - pr_err("compress asoc: can't open platform %s\n", - platform->component.name); + dev_err(platform->dev, + "Compress ASoC: can't open platform %s: %d\n", + platform->component.name, ret); goto plat_err; } } @@ -68,8 +70,9 @@ static int soc_compr_open(struct snd_compr_stream *cstream) __ret = component->driver->compr_ops->open(cstream); if (__ret < 0) { - pr_err("compress asoc: can't open platform %s\n", - component->name); + dev_err(component->dev, + "Compress ASoC: can't open platform %s: %d\n", + component->name, __ret); ret = __ret; } } @@ -79,7 +82,9 @@ static int soc_compr_open(struct snd_compr_stream *cstream) if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->startup) { ret = rtd->dai_link->compr_ops->startup(cstream); if (ret < 0) { - pr_err("compress asoc: %s startup failed\n", rtd->dai_link->name); + dev_err(rtd->dev, + "Compress ASoC: %s startup failed: %d\n", + rtd->dai_link->name, ret); goto machine_err; } } @@ -139,7 +144,8 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) if (cpu_dai->driver->cops && cpu_dai->driver->cops->startup) { ret = cpu_dai->driver->cops->startup(cstream, cpu_dai); if (ret < 0) { - dev_err(cpu_dai->dev, "Compress ASoC: can't open interface %s: %d\n", + dev_err(cpu_dai->dev, + "Compress ASoC: can't open interface %s: %d\n", cpu_dai->name, ret); goto out; } @@ -148,8 +154,9 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) if (platform && platform->driver->compr_ops && platform->driver->compr_ops->open) { ret = platform->driver->compr_ops->open(cstream); if (ret < 0) { - pr_err("compress asoc: can't open platform %s\n", - platform->component.name); + dev_err(platform->dev, + "Compress ASoC: can't open platform %s: %d\n", + platform->component.name, ret); goto plat_err; } } @@ -167,8 +174,9 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) __ret = component->driver->compr_ops->open(cstream); if (__ret < 0) { - pr_err("compress asoc: can't open platform %s\n", - component->name); + dev_err(component->dev, + "Compress ASoC: can't open platform %s: %d\n", + component->name, __ret); ret = __ret; } } @@ -178,7 +186,8 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) { ret = fe->dai_link->compr_ops->startup(cstream); if (ret < 0) { - pr_err("compress asoc: %s startup failed\n", fe->dai_link->name); + pr_err("Compress ASoC: %s startup failed: %d\n", + fe->dai_link->name, ret); goto machine_err; } } @@ -189,7 +198,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream) if (ret < 0) goto fe_err; else if (ret == 0) - dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", + dev_dbg(fe->dev, "Compress ASoC: %s no valid %s route\n", fe->dai_link->name, stream ? "capture" : "playback"); /* calculate valid and active FE <-> BE dpcms */ @@ -264,10 +273,11 @@ static void close_delayed_work(struct work_struct *work) mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); - dev_dbg(rtd->dev, "ASoC: pop wq checking: %s status: %s waiting: %s\n", - codec_dai->driver->playback.stream_name, - codec_dai->playback_active ? "active" : "inactive", - rtd->pop_wait ? "yes" : "no"); + dev_dbg(rtd->dev, + "Compress ASoC: pop wq checking: %s status: %s waiting: %s\n", + codec_dai->driver->playback.stream_name, + codec_dai->playback_active ? "active" : "inactive", + rtd->pop_wait ? "yes" : "no"); /* are we waiting on this codec DAI stream */ if (rtd->pop_wait == 1) { @@ -374,7 +384,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream) ret = dpcm_be_dai_hw_free(fe, stream); if (ret < 0) - dev_err(fe->dev, "compressed hw_free failed %d\n", ret); + dev_err(fe->dev, "Compressed ASoC: hw_free failed: %d\n", ret); ret = dpcm_be_dai_shutdown(fe, stream); @@ -1105,7 +1115,8 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) int playback = 0, capture = 0; if (rtd->num_codecs > 1) { - dev_err(rtd->card->dev, "Multicodec not supported for compressed stream\n"); + dev_err(rtd->card->dev, + "Compress ASoC: Multicodec not supported\n"); return -EINVAL; } @@ -1123,8 +1134,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) * should be set, check for that (xor) */ if (playback + capture != 1) { - dev_err(rtd->card->dev, "Invalid direction for compress P %d, C %d\n", - playback, capture); + dev_err(rtd->card->dev, + "Compress ASoC: Invalid direction for P %d, C %d\n", + playback, capture); return -EINVAL; } @@ -1152,8 +1164,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->dai_link->dpcm_playback, rtd->dai_link->dpcm_capture, &be_pcm); if (ret < 0) { - dev_err(rtd->card->dev, "ASoC: can't create compressed for %s\n", - rtd->dai_link->name); + dev_err(rtd->card->dev, + "Compress ASoC: can't create compressed for %s: %d\n", + rtd->dai_link->name, ret); goto compr_err; } @@ -1196,8 +1209,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) new_name, compr); if (ret < 0) { component = rtd->codec_dai->component; - pr_err("compress asoc: can't create compress for codec %s\n", - component->name); + dev_err(component->dev, + "Compress ASoC: can't create compress for codec %s: %d\n", + component->name, ret); goto compr_err; } @@ -1207,8 +1221,8 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->compr = compr; compr->private_data = rtd; - printk(KERN_INFO "compress asoc: %s <-> %s mapping ok\n", codec_dai->name, - cpu_dai->name); + dev_info(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n", + codec_dai->name, cpu_dai->name); return ret; compr_err: