[Armadeus-commitlog] SF.net SVN: armadeus:[947] trunk
Brought to you by:
sszy
|
From: <ar...@us...> - 2008-12-11 17:03:07
|
Revision: 947
http://armadeus.svn.sourceforge.net/armadeus/?rev=947&view=rev
Author: artemys
Date: 2008-12-11 17:03:02 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
[LINUX] ALSA/TSC : imx_dma_request_by_prio() returns an available channel not an error.
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
trunk/target/linux/sound/arm/imx-alsa.c
Added Paths:
-----------
trunk/target/linux/drivers/input/
trunk/target/linux/drivers/input/touchscreen/
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch 2008-12-11 15:37:15 UTC (rev 946)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch 2008-12-11 17:03:02 UTC (rev 947)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/sound/arm/imx-alsa.c
+++ linux-2.6.27.2.mod/sound/arm/imx-alsa.c
-@@ -0,0 +1,682 @@
+@@ -0,0 +1,683 @@
+/*
+ * sound/arm/imx-alsa.c
+ *
@@ -135,13 +135,14 @@
+static int audio_dma_request(struct audio_stream *s,
+ void (*callback) (int, void *))
+{
-+ int err=0;
++ int err=0, chan=0;
+ ADEBUG();
+
-+ err = imx_dma_request_by_prio(s->id, DMA_PRIO_HIGH);
-+ if (err < 0) {
++ chan = imx_dma_request_by_prio(s->id, DMA_PRIO_HIGH);
++ if (chan < 0) {
+ printk(KERN_ERR "Unable to grab dma channel: %d\n", s->dma_dev);
+ } else {
++ s->dma_dev = chan;
+ err = imx_dma_setup_handlers(s->dma_dev,
+ snd_imx_alsa_dma_interrupt,
+ dma_err_handler,
Modified: trunk/target/linux/sound/arm/imx-alsa.c
===================================================================
--- trunk/target/linux/sound/arm/imx-alsa.c 2008-12-11 15:37:15 UTC (rev 946)
+++ trunk/target/linux/sound/arm/imx-alsa.c 2008-12-11 17:03:02 UTC (rev 947)
@@ -34,13 +34,12 @@
#ifdef CONFIG_PM
#include <linux/pm.h>
#endif
-#include <sound/driver.h>
#include <sound/core.h>
#include <sound/pcm.h>
-#include <asm/arch/imx-alsa.h>
+#include <mach/imx-alsa.h>
#include <linux/dma-mapping.h>
-#include <asm/arch/imx-dma.h>
+#include <mach/imx-dma.h>
#define TSC_MASTER
@@ -130,13 +129,14 @@
static int audio_dma_request(struct audio_stream *s,
void (*callback) (int, void *))
{
- int err=0;
+ int err=0, chan=0;
ADEBUG();
- err = imx_dma_request_by_prio(&(s->dma_dev), s->id, DMA_PRIO_HIGH);
- if (err < 0) {
+ chan = imx_dma_request_by_prio(s->id, DMA_PRIO_HIGH);
+ if (chan < 0) {
printk(KERN_ERR "Unable to grab dma channel: %d\n", s->dma_dev);
} else {
+ s->dma_dev = chan;
err = imx_dma_setup_handlers(s->dma_dev,
snd_imx_alsa_dma_interrupt,
dma_err_handler,
@@ -239,7 +239,7 @@
runtime->dma_area + offset,
dma_size,
DMA_TO_DEVICE);
- if (dma_mapping_error(source)) {
+ if (dma_mapping_error((struct device*)NULL, source)) {
printk("Unable to map DMA buffer\n");
return;
}
@@ -382,7 +382,7 @@
int stream_id = substream->pstr->stream;
int err;
- printk ("snd_card_imx_alsa_open substream 0x%x\n", substream);
+ printk ("%s substream @: 0x%x\n", __func__, (unsigned int)substream);
chip->s[stream_id].stream = substream;
alsa_codec_config->codec_clock_on();
if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|