diff options
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch')
-rw-r--r-- | target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch b/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch index 9d8786a6ee..84b2af3041 100644 --- a/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch +++ b/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch @@ -1,7 +1,7 @@ -From 5d42dfcf42ba987a03d8b5f2dfa30e9cb2dc4721 Mon Sep 17 00:00:00 2001 +From 46b48162ae7d5323a73eea61c29f3f1e18e12b0c Mon Sep 17 00:00:00 2001 From: popcornmix <popcornmix@gmail.com> Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 061/174] Merge pull request #286 from +Subject: [PATCH 061/196] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -12,6 +12,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver sound/arm/bcm2835.h | 2 ++ 4 files changed, 124 insertions(+), 70 deletions(-) +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 4206b7e..21e435b 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -19,7 +19,8 @@ @@ -24,7 +26,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rate_min = 8000, -@@ -251,6 +252,12 @@ static int snd_bcm2835_pcm_prepare(struc +@@ -251,6 +252,12 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) audio_info(" .. IN\n"); @@ -37,7 +39,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream); alsa_stream->period_size = snd_pcm_lib_period_bytes(substream); alsa_stream->pos = 0; -@@ -263,6 +270,32 @@ static int snd_bcm2835_pcm_prepare(struc +@@ -263,6 +270,32 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) return 0; } @@ -70,7 +72,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* trigger callback */ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { -@@ -279,6 +312,11 @@ static int snd_bcm2835_pcm_trigger(struc +@@ -279,6 +312,11 @@ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd) if (!alsa_stream->running) { err = bcm2835_audio_start(alsa_stream); if (err == 0) { @@ -82,7 +84,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver alsa_stream->running = 1; alsa_stream->draining = 1; } else { -@@ -327,30 +365,9 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_s +@@ -327,30 +365,9 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) alsa_stream->pos); audio_info(" .. OUT\n"); @@ -116,7 +118,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver } static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream, -@@ -372,7 +389,7 @@ static struct snd_pcm_ops snd_bcm2835_pl +@@ -372,7 +389,7 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = { .prepare = snd_bcm2835_pcm_prepare, .trigger = snd_bcm2835_pcm_trigger, .pointer = snd_bcm2835_pcm_pointer, @@ -125,6 +127,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver }; /* create a pcm device */ +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 9ecb2d6..169d899 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -27,6 +27,7 @@ @@ -197,7 +201,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver break; } kfree((void *)work); -@@ -107,7 +120,7 @@ int bcm2835_audio_start(bcm2835_alsa_str +@@ -107,7 +120,7 @@ int bcm2835_audio_start(bcm2835_alsa_stream_t * alsa_stream) if (work) { INIT_WORK((struct work_struct *)work, my_wq_function); work->alsa_stream = alsa_stream; @@ -206,7 +210,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver if (queue_work (alsa_stream->my_wq, (struct work_struct *)work)) ret = 0; -@@ -128,7 +141,31 @@ int bcm2835_audio_stop(bcm2835_alsa_stre +@@ -128,7 +141,31 @@ int bcm2835_audio_stop(bcm2835_alsa_stream_t * alsa_stream) if (work) { INIT_WORK((struct work_struct *)work, my_wq_function); work->alsa_stream = alsa_stream; @@ -239,7 +243,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver if (queue_work (alsa_stream->my_wq, (struct work_struct *)work)) ret = 0; -@@ -178,7 +215,7 @@ static void audio_vchi_callback(void *pa +@@ -178,7 +215,7 @@ static void audio_vchi_callback(void *param, (" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_RESULT, success=%d\n", instance, m.u.result.success); instance->result = m.u.result.success; @@ -248,7 +252,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { irq_handler_t callback = (irq_handler_t) m.u.complete.callback; LOG_DBG -@@ -435,8 +472,8 @@ static int bcm2835_audio_set_ctls_chan(b +@@ -435,8 +472,8 @@ static int bcm2835_audio_set_ctls_chan(bcm2835_alsa_stream_t * alsa_stream, m.u.control.dest = chip->dest; m.u.control.volume = chip->volume; @@ -259,7 +263,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -452,11 +489,10 @@ static int bcm2835_audio_set_ctls_chan(b +@@ -452,11 +489,10 @@ static int bcm2835_audio_set_ctls_chan(bcm2835_alsa_stream_t * alsa_stream, } /* We are expecting a reply from the videocore */ @@ -273,7 +277,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unlock; } -@@ -539,8 +575,8 @@ int bcm2835_audio_set_params(bcm2835_als +@@ -539,8 +575,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, m.u.config.samplerate = samplerate; m.u.config.bps = bps; @@ -284,7 +288,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -556,11 +592,10 @@ int bcm2835_audio_set_params(bcm2835_als +@@ -556,11 +592,10 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, } /* We are expecting a reply from the videocore */ @@ -298,7 +302,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unlock; } -@@ -688,8 +723,8 @@ int bcm2835_audio_close(bcm2835_alsa_str +@@ -688,8 +723,8 @@ int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream) m.type = VC_AUDIO_MSG_TYPE_CLOSE; @@ -309,7 +313,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -702,11 +737,11 @@ int bcm2835_audio_close(bcm2835_alsa_str +@@ -702,11 +737,11 @@ int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream) ret = -1; goto unlock; } @@ -335,9 +339,11 @@ add mmap support and some cleanups to bcm2835 ALSA driver { VC_AUDIO_MSG_T m; AUDIO_INSTANCE_T *instance = alsa_stream->instance; +diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c +index e5ac894..d5ad830 100755 --- a/sound/arm/bcm2835.c +++ b/sound/arm/bcm2835.c -@@ -110,20 +110,20 @@ static int snd_bcm2835_alsa_probe(struct +@@ -110,20 +110,20 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) err = snd_bcm2835_create(g_card, pdev, &chip); if (err < 0) { @@ -394,7 +400,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver return err; } -@@ -326,49 +326,49 @@ static int bcm2835_alsa_device_init(void +@@ -326,49 +326,49 @@ static int bcm2835_alsa_device_init(void) int err; err = platform_driver_register(&bcm2835_alsa0_driver); if (err) { @@ -452,6 +458,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unregister_6; } +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index b966e28..08c763d 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -23,6 +23,7 @@ @@ -470,3 +478,6 @@ add mmap support and some cleanups to bcm2835 ALSA driver struct semaphore buffers_update_sem; struct semaphore control_sem; +-- +1.9.1 + |