* [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx
@ 2008-10-27 17:43 Daniel Ribeiro
2008-10-27 17:47 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Ribeiro @ 2008-10-27 17:43 UTC (permalink / raw)
To: alsa-devel, Mark Brown
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx
2008-10-27 17:43 [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx Daniel Ribeiro
@ 2008-10-27 17:47 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2008-10-27 17:47 UTC (permalink / raw)
To: Daniel Ribeiro; +Cc: alsa-devel
On Mon, Oct 27, 2008 at 03:43:17PM -0200, Daniel Ribeiro wrote:
> ASoC/pxa-ssp.c: fix build on pxa2xx
>
> SSACDD and SSACD_SCDX8 dont exist on pxa2xx.
>
> Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Thanks, will apply both.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-27 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 17:43 [PATCH] ASoC/pxa-ssp.c: fix build on pxa2xx Daniel Ribeiro
2008-10-27 17:47 ` Mark Brown
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.