From: arnaud.patard@rtp-net.org
To: alsa-devel@alsa-project.org
Cc: broonie@opensource.wolfsonmicro.com, tbm@cyrius.com,
Arnaud Patard <arnaud.patard@rtp-net.org>,
lrg@slimlogic.co.uk
Subject: [patch 1/2] ASoC: Fix kirkwood i2s mono playback
Date: Sun, 11 Jul 2010 23:28:31 +0200 [thread overview]
Message-ID: <20100711213505.842221724@rtp-net.org> (raw)
In-Reply-To: 20100711212830.815827907@rtp-net.org
[-- Attachment #1: kirkwood_fix_mono_playback.patch --]
[-- Type: text/plain, Size: 1531 bytes --]
Kirkwood controller needs to be informed if the audio stream is mono
or not. Failing to do so will result in playing at the wrong speed.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Index: sound-2.6/sound/soc/kirkwood/kirkwood-i2s.c
===================================================================
--- sound-2.6.orig/sound/soc/kirkwood/kirkwood-i2s.c 2010-07-10 21:53:35.000000000 +0200
+++ sound-2.6/sound/soc/kirkwood/kirkwood-i2s.c 2010-07-11 13:01:55.000000000 +0200
@@ -153,6 +153,15 @@
default:
return -EINVAL;
}
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ value &= ~KIRKWOOD_PLAYCTL_MONO_MASK;
+ if (params_channels(params) == 1)
+ value |= KIRKWOOD_PLAYCTL_MONO_BOTH;
+ else
+ value |= KIRKWOOD_PLAYCTL_MONO_OFF;
+ }
+
writel(i2s_value, priv->io+i2s_reg);
writel(value, priv->io+reg);
Index: sound-2.6/sound/soc/kirkwood/kirkwood.h
===================================================================
--- sound-2.6.orig/sound/soc/kirkwood/kirkwood.h 2010-07-11 12:08:30.000000000 +0200
+++ sound-2.6/sound/soc/kirkwood/kirkwood.h 2010-07-11 12:10:56.000000000 +0200
@@ -49,6 +49,9 @@
#define KIRKWOOD_PLAYCTL_BURST_32 (1<<11)
#define KIRKWOOD_PLAYCTL_PAUSE (1<<9)
#define KIRKWOOD_PLAYCTL_SPDIF_MUTE (1<<8)
+#define KIRKWOOD_PLAYCTL_MONO_MASK (3<<5)
+#define KIRKWOOD_PLAYCTL_MONO_BOTH (3<<5)
+#define KIRKWOOD_PLAYCTL_MONO_OFF (0<<5)
#define KIRKWOOD_PLAYCTL_I2S_MUTE (1<<7)
#define KIRKWOOD_PLAYCTL_SPDIF_EN (1<<4)
#define KIRKWOOD_PLAYCTL_I2S_EN (1<<3)
next prev parent reply other threads:[~2010-07-11 21:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-11 21:28 [patch 0/2] Kirkwood audio fixes arnaud.patard
2010-07-11 21:28 ` arnaud.patard [this message]
2010-07-13 11:38 ` [patch 1/2] ASoC: Fix kirkwood i2s mono playback Mark Brown
2010-07-11 21:28 ` [patch 2/2] ASoC: kirkwood-i2s: Handle mute/unmute playback/record arnaud.patard
2010-07-12 11:03 ` [patch 0/2] Kirkwood audio fixes Liam Girdwood
2010-07-13 11:34 ` Liam Girdwood
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=20100711213505.842221724@rtp-net.org \
--to=arnaud.patard@rtp-net.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=tbm@cyrius.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).