From: Zidan Wang <zidan.wang@freescale.com> To: <tiwai@suse.de> Cc: <broonie@kernel.org>, <lgirdwood@gmail.com>, <ckeepax@opensource.wolfsonmicro.com>, <lars@metafoo.de>, <patches@opensource.wolfsonmicro.com>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, Zidan Wang <zidan.wang@freescale.com> Subject: [alsa-devel][PATCH 2/4] ASoC: wm8960: add 32 bit word length support Date: Tue, 12 May 2015 14:58:21 +0800 [thread overview] Message-ID: <a55117060a6a22b1c523f19d9f47bd65054259e9.1431413323.git.zidan.wang@freescale.com> (raw) In-Reply-To: <c36ecb00aeb3115e208518c5e256f35f7b1308db.1431413323.git.zidan.wang@freescale.com> According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> --- sound/soc/codecs/wm8960.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index b072501..2559e31 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, case 24: iface |= 0x0008; break; + case 32: + /* right justify mode does not support 32 word length */ + if ((iface & 0x3) != 0) { + iface |= 0x000c; + break; + } default: dev_err(codec->dev, "unsupported width %d\n", params_width(params)); @@ -1050,7 +1056,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, #define WM8960_FORMATS \ (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ - SNDRV_PCM_FMTBIT_S24_LE) + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) static const struct snd_soc_dai_ops wm8960_dai_ops = { .hw_params = wm8960_hw_params, -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Zidan Wang <zidan.wang@freescale.com> To: tiwai@suse.de Cc: broonie@kernel.org, lgirdwood@gmail.com, ckeepax@opensource.wolfsonmicro.com, lars@metafoo.de, patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Zidan Wang <zidan.wang@freescale.com> Subject: [alsa-devel][PATCH 2/4] ASoC: wm8960: add 32 bit word length support Date: Tue, 12 May 2015 14:58:21 +0800 [thread overview] Message-ID: <a55117060a6a22b1c523f19d9f47bd65054259e9.1431413323.git.zidan.wang@freescale.com> (raw) In-Reply-To: <c36ecb00aeb3115e208518c5e256f35f7b1308db.1431413323.git.zidan.wang@freescale.com> According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> --- sound/soc/codecs/wm8960.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index b072501..2559e31 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -655,6 +655,12 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, case 24: iface |= 0x0008; break; + case 32: + /* right justify mode does not support 32 word length */ + if ((iface & 0x3) != 0) { + iface |= 0x000c; + break; + } default: dev_err(codec->dev, "unsupported width %d\n", params_width(params)); @@ -1050,7 +1056,7 @@ static int wm8960_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, #define WM8960_FORMATS \ (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ - SNDRV_PCM_FMTBIT_S24_LE) + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) static const struct snd_soc_dai_ops wm8960_dai_ops = { .hw_params = wm8960_hw_params, -- 1.9.1
next prev parent reply other threads:[~2015-05-12 6:56 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-12 6:58 [alsa-devel][PATCH 1/4] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock Zidan Wang 2015-05-12 6:58 ` [PATCH " Zidan Wang 2015-05-12 6:58 ` Zidan Wang [this message] 2015-05-12 6:58 ` [alsa-devel][PATCH 2/4] ASoC: wm8960: add 32 bit word length support Zidan Wang 2015-05-12 10:56 ` Charles Keepax 2015-05-12 6:58 ` [alsa-devel][PATCH 3/4] ASoC: wm8960: fix "RINPUT3" audio route error Zidan Wang 2015-05-12 6:58 ` [PATCH " Zidan Wang 2015-05-12 10:42 ` [alsa-devel][PATCH " Charles Keepax 2015-05-12 6:58 ` [alsa-devel][PATCH 4/4] ASoC: wm8958: correct BCLK DIV 348 to 384 Zidan Wang 2015-05-12 6:58 ` Zidan Wang 2015-05-12 10:43 ` Charles Keepax 2015-05-12 19:05 ` [alsa-devel][PATCH 1/4] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock 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=a55117060a6a22b1c523f19d9f47bd65054259e9.1431413323.git.zidan.wang@freescale.com \ --to=zidan.wang@freescale.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=ckeepax@opensource.wolfsonmicro.com \ --cc=lars@metafoo.de \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=patches@opensource.wolfsonmicro.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: linkBe 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.