1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 17 Apr 2012 00:33:10 +0100
Subject: [PATCH] Don't send data block when emitting silence
---
sound/arm/bcm2835-vchiq.c | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c
index 4497a23..820063a 100755
--- a/sound/arm/bcm2835-vchiq.c
+++ b/sound/arm/bcm2835-vchiq.c
@@ -761,20 +761,25 @@ int bcm2835_audio_write(bcm2835_alsa_stream_t * alsa_stream, uint32_t count,
ret = -1;
goto unlock;
}
- LOG_DBG(" ... send header\n");
-
- /* Send the message to the videocore */
- success = vchi_bulk_queue_transmit(instance->vchi_handle[0],
- src, count,
- 0 * VCHI_FLAGS_BLOCK_UNTIL_QUEUED +
- 1 * VCHI_FLAGS_BLOCK_UNTIL_DATA_READ,
- NULL);
- if (success != 0) {
- LOG_ERR("%s: failed on vchi_msg_queue (status=%d)",
- __func__, success);
+ LOG_DBG(" ... sent header\n");
+ if (!m.u.write.silence) {
+ /* Send the message to the videocore */
+ success = vchi_bulk_queue_transmit(instance->vchi_handle[0],
+ src, count,
+ 0 *
+ VCHI_FLAGS_BLOCK_UNTIL_QUEUED
+ +
+ 1 *
+ VCHI_FLAGS_BLOCK_UNTIL_DATA_READ,
+ NULL);
+ if (success != 0) {
+ LOG_ERR
+ ("%s: failed on vchi_bulk_queue_transmit (status=%d)",
+ __func__, success);
- ret = -1;
- goto unlock;
+ ret = -1;
+ goto unlock;
+ }
}
ret = 0;
|