From: Daniel Ribeiro <drwyrm@gmail.com>
To: alsa-devel <alsa-devel@alsa-project.org>,
Mark Brown <broonie@sirena.org.uk>
Subject: [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx
Date: Mon, 27 Oct 2008 15:43:17 -0200 [thread overview]
Message-ID: <1225129397.6519.49.camel@brutus> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: asoc-pxa-ssp-fix-build-on-pxa2xx.patch --]
[-- Type: text/x-patch, Size: 1268 bytes --]
ASoC/pxa-ssp.c: fix build on pxa2xx
SSACDD and SSACD_SCDX8 dont exist on pxa2xx.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 9ceddb0..a9fa75b 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -360,16 +360,25 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
break;
case PXA_SSP_AUDIO_DIV_SCDB:
val = ssp_read_reg(ssp, SSACD);
- val &= ~(SSACD_SCDB | SSACD_SCDX8);
+ val &= ~SSACD_SCDB;
+#if defined(CONFIG_PXA3xx)
+ if (cpu_is_pxa3xx())
+ val &= ~SSACD_SCDX8;
+#endif
switch (div) {
case PXA_SSP_CLK_SCDB_1:
val |= SSACD_SCDB;
break;
case PXA_SSP_CLK_SCDB_4:
break;
+#if defined(CONFIG_PXA3xx)
case PXA_SSP_CLK_SCDB_8:
- val |= SSACD_SCDX8;
+ if (cpu_is_pxa3xx())
+ val |= SSACD_SCDX8;
+ else
+ return -EINVAL;
break;
+#endif
default:
return -EINVAL;
}
@@ -395,7 +404,10 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai,
struct ssp_device *ssp = priv->dev.ssp;
u32 ssacd = ssp_read_reg(ssp, SSACD) & ~0x70;
- ssp_write_reg(ssp, SSACDD, 0);
+#if defined(CONFIG_PXA3xx)
+ if (cpu_is_pxa3xx())
+ ssp_write_reg(ssp, SSACDD, 0);
+#endif
switch (freq_out) {
case 5622000:
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2008-10-27 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 17:43 Daniel Ribeiro [this message]
2008-10-27 17:47 ` [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx 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=1225129397.6519.49.camel@brutus \
--to=drwyrm@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@sirena.org.uk \
/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