summaryrefslogtreecommitdiff
path: root/drivers/staging/most/aim-sound
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-09-28 17:18:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 03:18:51 +0200
commit71457d482751a38e78da32fde80e87b6f670c389 (patch)
tree5a5c845fb2a78d9c33ee48b1448473316af73cfa /drivers/staging/most/aim-sound
parentc81c9c3e0fd5170e7bede7d06202062338644e93 (diff)
staging: most: add fair buffer distribution
This patch ensures a fair distribution of buffers, when two AIMs share a single channel. The AIMs then won't be able to use more than half of all pre-allocated buffers of the linked channel. However, in case the channel is not shared, the AIM can exclusively use all available buffers. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-sound')
-rw-r--r--drivers/staging/most/aim-sound/sound.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c
index 2d4732c10df4..0d7425b19f1e 100644
--- a/drivers/staging/most/aim-sound/sound.c
+++ b/drivers/staging/most/aim-sound/sound.c
@@ -251,7 +251,8 @@ static int playback_thread(void *data)
wait_event_interruptible(
channel->playback_waitq,
kthread_should_stop() ||
- (mbo = most_get_mbo(channel->iface, channel->id)));
+ (mbo = most_get_mbo(channel->iface, channel->id,
+ &audio_aim)));
if (!mbo)
continue;