From: Mark Brown <broonie@kernel.org>
To: Kevin Li <kevin-ke.li@broadcom.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Scott Branden <sbranden@broadcom.com>,
Liam Girdwood <lgirdwood@gmail.com>, Ray Jui <rjui@broadcom.com>,
Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
bcm-kernel-feedback-list@broadcom.com,
Stephen Boyd <swboyd@chromium.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ASoC: brcm: Add DSL/PON SoC audio driver
Date: Mon, 9 Mar 2020 12:33:07 +0000 [thread overview]
Message-ID: <20200309123307.GE4101@sirena.org.uk> (raw)
In-Reply-To: <20200306222705.13309-1-kevin-ke.li@broadcom.com>
[-- Attachment #1.1: Type: text/plain, Size: 2084 bytes --]
On Fri, Mar 06, 2020 at 02:27:04PM -0800, Kevin Li wrote:
> This patch adds Broadcom DSL/PON SoC audio driver
> with Whistler I2S block. The SoC supported by this
> patch are BCM63158B0,BCM63178 and BCM47622/6755.
Please number patches within a series when you send it -
submitting-patches.rst should cover this.
> +++ b/sound/soc/bcm/bcm63xx-i2s-whistler.c
> @@ -0,0 +1,328 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * linux/sound/bcm/bcm63xx-i2s-whistler.c
> + * BCM63xx whistler i2s driver
Please make the entire comment a C++ one so things look more
intentional.
> +static int bcm63xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
> +{
> + return 0;
> +}
Remove empty functions, if the framework prevents removing the function
entirely that's a sign that you need to do something.
> +static int bcm63xx_i2s_startup(struct snd_pcm_substream *substream,
> + struct snd_soc_dai *dai)
> +{
> + unsigned int slaveMode;
Please use the kernel coding style.
> + struct bcm_i2s_priv *i2s_priv = snd_soc_dai_get_drvdata(dai);
> + struct regmap *regmap_i2s = i2s_priv->regmap_i2s;
> +
> + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
> + regmap_update_bits(regmap_i2s, I2S_TX_CFG,
> + I2S_TX_OUT_R | I2S_TX_DATA_ALIGNMENT |
> + I2S_TX_DATA_ENABLE | I2S_TX_CLOCK_ENABLE,
> + I2S_TX_OUT_R | I2S_TX_DATA_ALIGNMENT |
> + I2S_TX_DATA_ENABLE | I2S_TX_CLOCK_ENABLE);
> + regmap_write(regmap_i2s, I2S_TX_IRQ_CTL, 0);
> + regmap_write(regmap_i2s, I2S_TX_IRQ_IFF_THLD, 0);
> + regmap_write(regmap_i2s, I2S_TX_IRQ_OFF_THLD, 1);
> +
> + regmap_read(regmap_i2s, I2S_RX_CFG_2, &slaveMode);
> + if (slaveMode & I2S_RX_SLAVE_MODE_MASK)
> + regmap_update_bits(regmap_i2s, I2S_TX_CFG_2,
> + I2S_TX_SLAVE_MODE_MASK,
> + I2S_TX_MASTER_MODE);
> + else
> + regmap_update_bits(regmap_i2s, I2S_TX_CFG_2,
> + I2S_TX_SLAVE_MODE_MASK,
> + I2S_TX_SLAVE_MODE);
Setting master or slave mode should be done with a set_fmt() operation
but your set_fmt() operation was empty. How would this be configured?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-09 12:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 22:27 [PATCH] ASoC: brcm: Add DSL/PON SoC audio driver Kevin Li
2020-03-06 22:27 ` [PATCH] ASoC: brcm: DSL/PON SoC device tree bindings of " Kevin Li
2020-03-06 22:33 ` [PATCH] ASoC: brcm: Add DSL/PON SoC " Florian Fainelli
2020-03-06 22:50 ` Kevin Li
2020-03-06 23:02 ` Florian Fainelli
2020-03-09 12:33 ` Mark Brown [this message]
2020-03-09 17:33 ` Kevin Li
2020-03-09 17:52 ` Mark Brown
2020-03-09 18:14 ` Kevin Li
2020-03-09 19:18 ` Mark Brown
2020-03-10 15:49 ` Kevin Li
2020-03-10 16:28 ` Mark Brown
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=20200309123307.GE4101@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=kevin-ke.li@broadcom.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=swboyd@chromium.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).