Message ID | 20190225164218.19439-2-TheSven73@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 917B6922 for <patchwork-alsa-devel@patchwork.kernel.org>; Mon, 25 Feb 2019 17:09:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71CFD29F7D for <patchwork-alsa-devel@patchwork.kernel.org>; Mon, 25 Feb 2019 17:09:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 639732A0D5; Mon, 25 Feb 2019 17:09:10 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84BC729F7D for <patchwork-alsa-devel@patchwork.kernel.org>; Mon, 25 Feb 2019 17:09:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 80BFB166C; Mon, 25 Feb 2019 17:43:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 80BFB166C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1551113068; bh=tdV7P2dbiPVzPRFrpoV6R3/TL/AxjUlZgy5q7t7oOYY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=idGO2TXHviyWkikikUsUHKfSa83tRCQ8Z7SEg77fuzC03+8Xb/rTqftE9I7LN1ggD d5Ps2yq6P+1qsEnniKPW+hhAD9Z6rVudIFsWorWh5ibZDnoAU4Cko1tZBWhOuh/70s X8auMacsE1lMcs30b+XXRwVYxKrjMLfgKABMJvYs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 48D15F8966C; Mon, 25 Feb 2019 17:42:35 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id BFFFAF8965C; Mon, 25 Feb 2019 17:42:31 +0100 (CET) Received: from mail-it1-x144.google.com (mail-it1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A5256F89656 for <alsa-devel@alsa-project.org>; Mon, 25 Feb 2019 17:42:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A5256F89656 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dsMeTdjt" Received: by mail-it1-x144.google.com with SMTP id i2so14287335ite.5 for <alsa-devel@alsa-project.org>; Mon, 25 Feb 2019 08:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G573mII/H/07wIJC4l9XC5m8MWa4IzbRGvELz9c19NA=; b=dsMeTdjt9kifROuXHJXJAEqW32aBeg0MKpOBn+iJbuaBIhcyY2rjXnNTm2LUO7UBwV SPAg3YMdO6xxbCX3n3s78yzcGx9pq4LkT35WQVgeRoJzuWB+kbAiwJbRiiX2vMJaegDk aeUfPl6I27eTfgDTksf6xH/tIo7kP2wvQrwUExShZisFhQ3pupp60j2tIHbFShpV7t5P QhADb/CXDXy58GdXzlWmFT0VKJi33zWJk9hUQfiGheqfV12GOuBngmKluyUMOsvwdhVr 0sf3Du39cg5+SJdL+qN6Vu5YUecal5GFgjcSRNwv1YWlWWZ/3P9Em4KGahQTXm5+Zii9 /vbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G573mII/H/07wIJC4l9XC5m8MWa4IzbRGvELz9c19NA=; b=bj6woaeO82fxlY3sOQVbnGPElIjtGKZb15NTUxxetmsxf+eY4XYqcaeiUewthi7vCz c0KqqA07t5JYYZGyHYM4e39/cHndw/LcU7SouCrTRUr18b/8RoDuBh2TGXj3BkNm00aN 2quynopFh7A1uZj/ZoUyHdRnS/x0eRqv4cCgAuLXWGT4NyaAIp1WB0+Y9B3vgduReppX aef8Fd7atqO5uNuvd2Toc8JH4dhFbGIJllYgrwx94meWvTgtxbTH379QZKYEceNPCaag Zl3jQZt9OApxG7lZ++WopG5nL0GfGfmo83Cb1KfiaoWi7RG322VjI42WlAdyuaiBrALu fWeg== X-Gm-Message-State: AHQUAuZnwUR9bcoCNl+kXt6OItxZKquHGZzUdiGEgx4+G90y2OpwMp4v TTmZ5YyseVU+Id1lefnFAqQ= X-Google-Smtp-Source: AHgI3IYYytotseBqN5azYu9+KA3bnqza6FH4lViNZE0TSuPCDyuubvld15kZs9WneOBt1V9uk8iE6g== X-Received: by 2002:a24:f804:: with SMTP id a4mr1277627ith.2.1551112946697; Mon, 25 Feb 2019 08:42:26 -0800 (PST) Received: from svens-asus.arcx.com ([184.94.50.30]) by smtp.gmail.com with ESMTPSA id l2sm4049549ioj.55.2019.02.25.08.42.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 08:42:26 -0800 (PST) From: Sven Van Asbroeck <thesven73@gmail.com> X-Google-Original-From: Sven Van Asbroeck <TheSven73@gmail.com> To: Russell King - ARM Linux admin <linux@armlinux.org.uk>, Mark Brown <broonie@kernel.org>, Peter Ujfalusi <peter.ujfalusi@ti.com>, Jyri Sarha <jsarha@ti.com> Date: Mon, 25 Feb 2019 11:42:18 -0500 Message-Id: <20190225164218.19439-2-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190225164218.19439-1-TheSven73@gmail.com> References: <20190225164218.19439-1-TheSven73@gmail.com> Cc: alsa-devel@alsa-project.org, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, David Airlie <airlied@linux.ie>, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com>, dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch> Subject: [alsa-devel] [RFC PATCH 2/2] ASoC: core: standardize snd_soc_dai_set_bclk_ratio() behaviour X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" <alsa-devel.alsa-project.org> List-Unsubscribe: <https://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <https://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" <alsa-devel-bounces@alsa-project.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[RFC,1/2] ASoC: simple-card: add support for bclk_ratio
|
expand
|
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 50617db05c46..5611caf25ea3 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2550,10 +2550,11 @@ EXPORT_SYMBOL_GPL(snd_soc_component_set_pll); */ int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) { - if (dai->driver->ops->set_bclk_ratio) - return dai->driver->ops->set_bclk_ratio(dai, ratio); - else + if (dai->driver == NULL) return -EINVAL; + if (dai->driver->ops->set_bclk_ratio == NULL) + return -ENOTSUPP; + return dai->driver->ops->set_bclk_ratio(dai, ratio); } EXPORT_SYMBOL_GPL(snd_soc_dai_set_bclk_ratio);
snd_soc_dai_set_bclk_ratio() should behave like other snd_soc_dai_XXX functions, and return -ENOTSUPP if the callback in driver->ops is NULL. Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> --- sound/soc/soc-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)