From: Tushar Behera <tushar.behera@linaro.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface
Date: Tue, 20 May 2014 10:44:41 +0530 [thread overview]
Message-ID: <537AE4C1.7050703@linaro.org> (raw)
In-Reply-To: <1400520638-6907-1-git-send-email-s.nawrocki@samsung.com>
On 05/19/2014 11:00 PM, Sylwester Nawrocki wrote:
> This patch adds support for setting source clock of the "Core CLK"
> of the IIS Multi Audio Interface.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> sound/soc/samsung/i2s.c | 4 ++++
> sound/soc/samsung/i2s.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
> index 048ead9..ae02811 100644
> --- a/sound/soc/samsung/i2s.c
> +++ b/sound/soc/samsung/i2s.c
> @@ -451,6 +451,10 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
> u32 mod = readl(i2s->addr + I2SMOD);
>
> switch (clk_id) {
> + case SAMSUNG_I2S_OPCLK:
> + mod &= ~MOD_OPCLK_MASK;
> + mod |= dir;
I am assuming here that dir is one of SND_SOC_CLOCK_IN or
SND_SOC_CLOCK_OUT. In that case, you need to take care of offset (30).
Also the value of this bit-field doesn't match with SND_SOC_CLOCK_XXX
macros.
Bit-field (2'b):
00 Codec Clock out
01 Codec Clock in
10 Bit clock out
11 Audio bus clock
Value of macros:
SND_SOC_CLOCK_IN 0
SND_SOC_CLOCK_OUT 1
In the manual, this field is suggested to be Audio bus clock always. Is
there an use-case where we might need to update this?
The default value for audio playback right now is 00 (2'b), which needs
to be fixed anyways.
--
Tushar Behera
WARNING: multiple messages have this Message-ID (diff)
From: tushar.behera@linaro.org (Tushar Behera)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface
Date: Tue, 20 May 2014 10:44:41 +0530 [thread overview]
Message-ID: <537AE4C1.7050703@linaro.org> (raw)
In-Reply-To: <1400520638-6907-1-git-send-email-s.nawrocki@samsung.com>
On 05/19/2014 11:00 PM, Sylwester Nawrocki wrote:
> This patch adds support for setting source clock of the "Core CLK"
> of the IIS Multi Audio Interface.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> sound/soc/samsung/i2s.c | 4 ++++
> sound/soc/samsung/i2s.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
> index 048ead9..ae02811 100644
> --- a/sound/soc/samsung/i2s.c
> +++ b/sound/soc/samsung/i2s.c
> @@ -451,6 +451,10 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
> u32 mod = readl(i2s->addr + I2SMOD);
>
> switch (clk_id) {
> + case SAMSUNG_I2S_OPCLK:
> + mod &= ~MOD_OPCLK_MASK;
> + mod |= dir;
I am assuming here that dir is one of SND_SOC_CLOCK_IN or
SND_SOC_CLOCK_OUT. In that case, you need to take care of offset (30).
Also the value of this bit-field doesn't match with SND_SOC_CLOCK_XXX
macros.
Bit-field (2'b):
00 Codec Clock out
01 Codec Clock in
10 Bit clock out
11 Audio bus clock
Value of macros:
SND_SOC_CLOCK_IN 0
SND_SOC_CLOCK_OUT 1
In the manual, this field is suggested to be Audio bus clock always. Is
there an use-case where we might need to update this?
The default value for audio playback right now is 00 (2'b), which needs
to be fixed anyways.
--
Tushar Behera
next prev parent reply other threads:[~2014-05-20 5:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 17:30 [PATCH] ASoC: samsung: Allow setting OP_CLK of the IIS Multi Audio Interface Sylwester Nawrocki
2014-05-19 17:30 ` Sylwester Nawrocki
2014-05-20 5:14 ` Tushar Behera [this message]
2014-05-20 5:14 ` Tushar Behera
2014-05-20 9:10 ` Sylwester Nawrocki
2014-05-20 9:10 ` Sylwester Nawrocki
2014-05-20 10:01 ` Tushar Behera
2014-05-20 10:01 ` Tushar Behera
2014-05-20 10:10 ` Mark Brown
2014-05-20 10:10 ` Mark Brown
2014-05-20 22:21 ` Mark Brown
2014-05-20 22:21 ` 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=537AE4C1.7050703@linaro.org \
--to=tushar.behera@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=s.nawrocki@samsung.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 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.