From: Stephen Boyd <sboyd@codeaurora.org>
To: srinivas.kandagatla@linaro.org,
Andy Gross <andy.gross@linaro.org>,
Mark Brown <broonie@kernel.org>,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org
Cc: David Brown <david.brown@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Patrick Lai <plai@codeaurora.org>,
Banajit Goswami <bgoswami@codeaurora.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RESEND PATCH v2 14/15] ASoC: qcom: apq8096: Add db820c machine driver
Date: Wed, 3 Jan 2018 09:20:45 -0800 [thread overview]
Message-ID: <f72f32dd-e248-47c3-23cc-eabe1b85d9ae@codeaurora.org> (raw)
In-Reply-To: <20171214173402.19074-15-srinivas.kandagatla@linaro.org>
On 12/14/2017 09:34 AM, srinivas.kandagatla@linaro.org wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> uThis patch adds support to DB820c machine driver.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> sound/soc/qcom/Kconfig | 9 +++-
> sound/soc/qcom/apq8096.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 132 insertions(+), 1 deletion(-)
> create mode 100644 sound/soc/qcom/apq8096.c
>
> diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
> index ecd1e4ba834d..748ccc3edefa 100644
> --- a/sound/soc/qcom/Kconfig
> +++ b/sound/soc/qcom/Kconfig
> @@ -72,7 +72,6 @@ config SND_SOC_QDSP6_ASM_DAI
> tristate
> default n
>
> -
> config SND_SOC_QDSP6
> tristate "SoC ALSA audio driver for QDSP6"
> select SND_SOC_QDSP6_AFE
> @@ -87,3 +86,11 @@ config SND_SOC_QDSP6
> This will enable sound soc platform specific
> audio drivers. This includes q6asm, q6adm,
> q6afe interfaces to DSP using apr.
> +
> +config SND_SOC_MSM8996
> + tristate "SoC Machine driver for MSM8996 and APQ8096 boards"
> + select SND_SOC_QDSP6V2
> + default n
> + help
> + To add support for SoC audio on MSM8996 and APQ8096 boards
> +
> diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
> new file mode 100644
> index 000000000000..5b2036317f71
> --- /dev/null
> +++ b/sound/soc/qcom/apq8096.c
> @@ -0,0 +1,124 @@
> +/*
> + * Copyright (c) 2017 The Linux Foundation. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + */
> +#include <linux/clk.h>
No clk usage though?
> +#include <linux/platform_device.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>
> +#include <sound/soc.h>
[...]
> +static struct snd_soc_dai_link msm8996_dai_links[] = {
> + /* FrontEnd DAI Links */
> + {
> + .name = "MultiMedia1 Playback",
> + .stream_name = "MultiMedia1",
> + .cpu_dai_name = "MM_DL1",
> + .platform_name = "q6asm_dai",
> + .dynamic = 1,
> + .dpcm_playback = 1,
> +
> + .codec_dai_name = "snd-soc-dummy-dai",
> + .codec_name = "snd-soc-dummy",
> + },
> + /* Backend DAI Links */
> + {
> + .name = "HDMI Playback",
> + .stream_name = "q6afe_dai",
> + .cpu_dai_name = "HDMI",
> + .platform_name = "q6routing",
> + .no_pcm = 1,
> + .dpcm_playback = 1,
> + .be_hw_params_fixup = msm8996_be_hw_params_fixup,
> + .codec_dai_name = "i2s-hifi",
> + .codec_name = "hdmi-audio-codec.0.auto",
> + },
> +};
> +
> +static int apq8096_sbc_parse_of(struct snd_soc_card *card)
> +{
> + struct device *dev = card->dev;
> + int ret;
> +
> + ret = snd_soc_of_parse_card_name(card, "qcom,model");
> + if (ret)
> + dev_err(dev, "Error parsing card name: %d\n", ret);
So this prints an error, and the caller also prints an error when it
fails. Double error messages?
> +
> + return ret;
> +}
> +
> +static int msm_snd_apq8096_probe(struct platform_device *pdev)
> +{
> + int ret;
> + struct snd_soc_card *card;
> +
> + card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL);
> + if (!card)
> + return -ENOMEM;
> +
> + card->dev = &pdev->dev;
> +
> + ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
Why do we need to do this? Can you add some sort of comment in the code
about why?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-01-03 17:20 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 17:33 [RESEND PATCH v2 00/15] ASoC: qcom: Add support to QDSP6 based audio srinivas.kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 01/15] dt-bindings: soc: qcom: Add bindings for APR bus srinivas.kandagatla
[not found] ` <20171214173402.19074-2-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-12-16 17:27 ` Rob Herring
2017-12-18 9:50 ` Srinivas Kandagatla
2018-01-03 0:35 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 02/15] soc: qcom: add support to APR bus driver srinivas.kandagatla
[not found] ` <20171214173402.19074-3-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-01 23:29 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 03/15] ASoC: qcom: qdsp6: Add common qdsp6 helper functions srinivas.kandagatla
2018-01-02 0:19 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 04/15] ASoC: qcom: qdsp6: Add support to Q6AFE srinivas.kandagatla
2018-01-02 0:45 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 05/15] ASoC: qcom: qdsp6: Add support to Q6ADM srinivas.kandagatla
[not found] ` <20171214173402.19074-6-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-02 1:50 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 06/15] ASoC: qcom: qdsp6: Add support to Q6ASM srinivas.kandagatla
[not found] ` <20171214173402.19074-7-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-02 4:43 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
[not found] ` <20171214173402.19074-1-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-12-14 17:33 ` [RESEND PATCH v2 07/15] ASoC: qcom: q6asm: Add support to memory map and unmap srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A
2018-01-02 5:48 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
[not found] ` <4d1d17df-71a4-2896-29c1-9d033a2f3711-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 19:39 ` Bjorn Andersson
2017-12-14 17:34 ` [RESEND PATCH v2 13/15] dt-bindings: sound: qcom: Add devicetree bindings for apq8096 srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A
2017-12-16 17:44 ` Rob Herring
2017-12-18 9:49 ` Srinivas Kandagatla
2018-01-03 0:28 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
[not found] ` <787ecdc5-66d8-23ee-7136-2a8759c86536-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 19:49 ` Bjorn Andersson
2017-12-14 17:34 ` [RESEND PATCH v2 14/15] ASoC: qcom: apq8096: Add db820c machine driver srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A
2018-01-03 0:16 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2018-01-03 20:04 ` Bjorn Andersson
2018-01-03 17:20 ` Stephen Boyd [this message]
2018-01-03 18:36 ` Srinivas Kandagatla
2018-01-03 19:41 ` Stephen Boyd
2018-01-04 9:25 ` Srinivas Kandagatla
2018-01-04 12:02 ` Mark Brown
2018-01-04 13:44 ` Srinivas Kandagatla
2018-01-04 14:03 ` Mark Brown
2017-12-14 17:33 ` [RESEND PATCH v2 08/15] ASoC: qcom: q6asm: add support to audio stream apis srinivas.kandagatla
2018-01-02 20:08 ` Bjorn Andersson
2018-01-03 16:26 ` Srinivas Kandagatla
2018-01-13 8:42 ` Rohit Kumar
2017-12-14 17:33 ` [RESEND PATCH v2 09/15] ASoC: qcom: qdsp6: Add support to Q6CORE srinivas.kandagatla
2018-01-02 22:15 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2018-02-07 12:15 ` [alsa-devel] " Rohit Kumar
2017-12-14 17:33 ` [RESEND PATCH v2 10/15] ASoC: qcom: qdsp6: Add support to q6routing driver srinivas.kandagatla
2018-01-02 23:00 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 11/15] ASoC: qcom: qdsp6: Add support to q6afe dai driver srinivas.kandagatla
[not found] ` <20171214173402.19074-12-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-02 23:28 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2018-02-07 11:34 ` Rohit Kumar
2018-02-07 11:40 ` [alsa-devel] " Srinivas Kandagatla
2017-12-14 17:33 ` [RESEND PATCH v2 12/15] ASoC: qcom: qdsp6: Add support to q6asm " srinivas.kandagatla
2018-01-03 0:03 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2018-01-13 8:45 ` [alsa-devel] " Rohit Kumar
2017-12-14 17:34 ` [RESEND PATCH v2 15/15] arm64: dts: msm8996: db820c: Add sound card support srinivas.kandagatla
[not found] ` <20171214173402.19074-16-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 0:22 ` Bjorn Andersson
2018-01-03 16:27 ` Srinivas Kandagatla
2018-01-03 20:01 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f72f32dd-e248-47c3-23cc-eabe1b85d9ae@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=andy.gross@linaro.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=david.brown@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=perex@perex.cz \
--cc=plai@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).