From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Inha Song <ideal.song@samsung.com>
Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org,
pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
linux@arm.linux.org.uk, kgene@kernel.org, sbkim73@samsung.com,
lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.de, grant.likely@linaro.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH v3 1/4] ASoC: samsung: Add machine driver for Trats2
Date: Thu, 22 Jan 2015 13:16:03 +0100 [thread overview]
Message-ID: <54C0EA03.703@samsung.com> (raw)
In-Reply-To: <1421925482-15861-2-git-send-email-ideal.song@samsung.com>
On 22/01/15 12:17, Inha Song wrote:
> diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
> index fc67f97..8031423 100644
> --- a/sound/soc/samsung/Kconfig
> +++ b/sound/soc/samsung/Kconfig
> @@ -245,3 +245,11 @@ config SND_SOC_ARNDALE_RT5631_ALC5631
> depends on SND_SOC_SAMSUNG
> select SND_SAMSUNG_I2S
> select SND_SOC_RT5631
> +
> +config SND_SOC_SAMSUNG_TRATS2_WM1811
> + tristate "SoC I2S Audio support for WM1811 on Tizen Trats2 board"
> + depends on SND_SOC_SAMSUNG
> + select SND_SOC_WM8994
> + select SND_SAMSUNG_I2S
Shouldn't you also select the MFD part of WM8994 here ?
> +++ b/sound/soc/samsung/trats2_wm1811.c
> @@ -0,0 +1,218 @@
> +static struct snd_soc_dai_link trats2_dai[] = {
> + {
> + .name = "WM1811 AIF1",
> + .stream_name = "Pri_Dai",
Could we have a less cryptic name here, e.g. "HiFi Primary" ?
> + .codec_dai_name = "wm8994-aif1",
> + .codec_name = "wm8994-codec",
> + .ops = &trats2_aif1_ops,
> + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> + SND_SOC_DAIFMT_CBM_CFM,
> + },
> +};
> +static int trats2_audio_probe(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + struct snd_soc_card *card = &trats2_card;
> + struct device_node *codec_node;
> + struct snd_soc_dai_link *dai_link = card->dai_link;
> + struct trats2_machine_priv *priv = snd_soc_card_get_drvdata(card);
> + int ret;
> +
> + if (!np) {
> + dev_err(&pdev->dev, "of node is missing.\n");
> + return -ENODEV;
I'd say this whole np test could be dropped, we will fail right below
at the snd_soc_of_parse_card_name() function call if np is NULL.
Such a situation seems highly unlikely anyway.
> + }
> +
> + card->dev = &pdev->dev;
> +
> + ret = snd_soc_of_parse_card_name(card, "samsung,model");
> + if (ret) {
> + dev_err(&pdev->dev,
> + "Card name is not provided\n");
I guess it would fit in a single line.
> + return ret;
> + }
> +
> +static struct platform_driver trats2_audio_driver = {
> + .driver = {
> + .name = "trats2-audio",
> + .owner = THIS_MODULE,
You can drop this .owner field assignment, it's also done in
module_platform_driver() macro.
> + .pm = &snd_soc_pm_ops,
> + .of_match_table = trats2_audio_of_match,
> + },
> + .probe = trats2_audio_probe,
> + .remove = trats2_audio_remove,
> +};
> +
> +module_platform_driver(trats2_audio_driver);
--
Regards,
Sylwester
WARNING: multiple messages have this Message-ID (diff)
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH v3 1/4] ASoC: samsung: Add machine driver for Trats2
Date: Thu, 22 Jan 2015 13:16:03 +0100 [thread overview]
Message-ID: <54C0EA03.703@samsung.com> (raw)
In-Reply-To: <1421925482-15861-2-git-send-email-ideal.song@samsung.com>
On 22/01/15 12:17, Inha Song wrote:
> diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
> index fc67f97..8031423 100644
> --- a/sound/soc/samsung/Kconfig
> +++ b/sound/soc/samsung/Kconfig
> @@ -245,3 +245,11 @@ config SND_SOC_ARNDALE_RT5631_ALC5631
> depends on SND_SOC_SAMSUNG
> select SND_SAMSUNG_I2S
> select SND_SOC_RT5631
> +
> +config SND_SOC_SAMSUNG_TRATS2_WM1811
> + tristate "SoC I2S Audio support for WM1811 on Tizen Trats2 board"
> + depends on SND_SOC_SAMSUNG
> + select SND_SOC_WM8994
> + select SND_SAMSUNG_I2S
Shouldn't you also select the MFD part of WM8994 here ?
> +++ b/sound/soc/samsung/trats2_wm1811.c
> @@ -0,0 +1,218 @@
> +static struct snd_soc_dai_link trats2_dai[] = {
> + {
> + .name = "WM1811 AIF1",
> + .stream_name = "Pri_Dai",
Could we have a less cryptic name here, e.g. "HiFi Primary" ?
> + .codec_dai_name = "wm8994-aif1",
> + .codec_name = "wm8994-codec",
> + .ops = &trats2_aif1_ops,
> + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> + SND_SOC_DAIFMT_CBM_CFM,
> + },
> +};
> +static int trats2_audio_probe(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + struct snd_soc_card *card = &trats2_card;
> + struct device_node *codec_node;
> + struct snd_soc_dai_link *dai_link = card->dai_link;
> + struct trats2_machine_priv *priv = snd_soc_card_get_drvdata(card);
> + int ret;
> +
> + if (!np) {
> + dev_err(&pdev->dev, "of node is missing.\n");
> + return -ENODEV;
I'd say this whole np test could be dropped, we will fail right below
at the snd_soc_of_parse_card_name() function call if np is NULL.
Such a situation seems highly unlikely anyway.
> + }
> +
> + card->dev = &pdev->dev;
> +
> + ret = snd_soc_of_parse_card_name(card, "samsung,model");
> + if (ret) {
> + dev_err(&pdev->dev,
> + "Card name is not provided\n");
I guess it would fit in a single line.
> + return ret;
> + }
> +
> +static struct platform_driver trats2_audio_driver = {
> + .driver = {
> + .name = "trats2-audio",
> + .owner = THIS_MODULE,
You can drop this .owner field assignment, it's also done in
module_platform_driver() macro.
> + .pm = &snd_soc_pm_ops,
> + .of_match_table = trats2_audio_of_match,
> + },
> + .probe = trats2_audio_probe,
> + .remove = trats2_audio_remove,
> +};
> +
> +module_platform_driver(trats2_audio_driver);
--
Regards,
Sylwester
next prev parent reply other threads:[~2015-01-22 12:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 11:17 [alsa-devel] [PATCH v3 0/4] Sound support for Exynos4412 Trats2 board Inha Song
2015-01-22 11:17 ` Inha Song
2015-01-22 11:17 ` [PATCH v3 1/4] ASoC: samsung: Add machine driver for Trats2 Inha Song
2015-01-22 11:17 ` [alsa-devel] " Inha Song
2015-01-22 11:17 ` Inha Song
2015-01-22 12:16 ` Sylwester Nawrocki [this message]
2015-01-22 12:16 ` Sylwester Nawrocki
[not found] ` <54C0EA03.703-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-23 0:56 ` Inha Song
2015-01-23 0:56 ` Inha Song
2015-01-23 0:56 ` Inha Song
2015-01-22 11:18 ` [alsa-devel] [PATCH v3 2/4] ASoC: samsung: Document Trats2 audio subsystem bindings Inha Song
2015-01-22 11:18 ` Inha Song
2015-01-22 12:17 ` Sylwester Nawrocki
2015-01-22 12:17 ` Sylwester Nawrocki
2015-01-22 11:18 ` [alsa-devel] [PATCH v3 3/4] ARM: dts: set clock out parent to XUSBXTI Inha Song
2015-01-22 11:18 ` Inha Song
2015-01-22 12:25 ` Sylwester Nawrocki
2015-01-22 12:25 ` Sylwester Nawrocki
2015-01-23 0:49 ` Inha Song
2015-01-23 0:49 ` Inha Song
[not found] ` <54C0EC23.9070209-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-23 6:41 ` Kukjin Kim
2015-01-23 6:41 ` Kukjin Kim
2015-01-23 6:41 ` Kukjin Kim
2015-01-22 11:18 ` [alsa-devel] [PATCH v3 4/4] ARM: dts: Add sound nodes for exynos4412-trats2 Inha Song
2015-01-22 11:18 ` Inha Song
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=54C0EA03.703@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ideal.song@samsung.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kgene@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=sbkim73@samsung.com \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.