From: Philipp Zabel <philipp.zabel@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Philipp Zabel <philipp.zabel@gmail.com>
Subject: [PATCH 1/4] ASoC: Use network mode with 2 slots for 16-bit stereo in pxa-ssp/Zylonite
Date: Tue, 3 Mar 2009 16:10:51 +0100 [thread overview]
Message-ID: <1236093054-1952-1-git-send-email-philipp.zabel@gmail.com> (raw)
For consistency with 24-bit and 32-bit modes, don't send 16-bit stereo
in one 32-bit transfer. Use 2 slots instead on Zylonite. It should result
in exactly the same behaviour.
Now it is possible to use 16-bit single slot transfers in pxa-ssp, which
are needed for Magician to get two frame clock pulses per sample
(one for each channel).
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
sound/soc/pxa/pxa-ssp.c | 3 +--
sound/soc/pxa/zylonite.c | 7 +++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 4a973ab..c49bb12 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -644,8 +644,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
sscr0 |= SSCR0_FPCKE;
#endif
sscr0 |= SSCR0_DataSize(16);
- if (params_channels(params) > 1)
- sscr0 |= SSCR0_EDSS;
+ /* use network mode (2 slots) for 16 bit stereo */
break;
case SNDRV_PCM_FORMAT_S24_LE:
sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(8));
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index 0140a25..9f6116e 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -127,8 +127,11 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
- /* We're not really in network mode but the emulation wants this. */
- ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1);
+ /* Use network mode for stereo, one slot per channel. */
+ if (params_channels(params) > 1)
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 2);
+ else
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 1, 1);
if (ret < 0)
return ret;
--
1.6.1.3
next reply other threads:[~2009-03-03 15:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 15:10 Philipp Zabel [this message]
2009-03-03 15:10 ` [PATCH 2/4] ASoC: UDA1380: DATAI is slave only Philipp Zabel
2009-03-03 15:50 ` Mark Brown
2009-03-03 15:56 ` pHilipp Zabel
2009-03-03 15:58 ` Mark Brown
2009-03-03 15:10 ` [PATCH 3/4] ASoC: Remove version display from the UDA1380 driver Philipp Zabel
2009-03-03 15:52 ` Mark Brown
2009-03-03 15:10 ` [PATCH 4/4] ASoC: UDA1380: change decimator/interpolator register handling Philipp Zabel
2009-03-03 15:48 ` [PATCH 1/4] ASoC: Use network mode with 2 slots for 16-bit stereo in pxa-ssp/Zylonite Mark Brown
2009-03-04 1:34 ` Daniel Mack
2009-03-04 14:29 ` Mark Brown
2009-03-04 20:45 ` pHilipp Zabel
2009-03-05 16:06 ` pHilipp Zabel
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=1236093054-1952-1-git-send-email-philipp.zabel@gmail.com \
--to=philipp.zabel@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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