NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/45776: audio freezes on when skipping audio on btsco with mplayer sun audio output
>Number: 45776
>Category: kern
>Synopsis: audio freezes on when skipping audio on btsco with mplayer sun
>audio output
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 04 15:35:00 +0000 2012
>Originator: Nat Sloss
>Release: NetBSD 5.0.1
>Organization:
>Environment:
NetBSD beast 5.0.1 NetBSD 5.0.1 (BEAST) #92: Mon Jan 2 23:55:27 EST 2012
build@beast:/home/build/NetBSD-5.0.1_source_tree/usr/src/sys/arch/i386/compile/BEAST
i386
>Description:
When skipping audio with mplayer -ao:sun with btsco bluetooth audio the audio
output freezes and cannot recover only killed.
>How-To-Repeat:
setup btsco audio. btdev, bthset, scomtu and configuration for ubt sco packets
etc.
run mplayer -ao sun:/dev/audio[bluetooth audio device number] something.mp3
skip audio with left arrow or up arrow.
The problem also affects NetBSD-5.99.58.
>Fix:
I don't know if I have done the right thing but I noticed that btsco uses
start_output and start_input, Other drivers seem to use trigger_output/input.
With experimentation I have found that trigger output is called after skipping
audio with mplayer but not start_output.
audiostartp is called and then it gets trapped in audio poll endlessly.
So I patched audio.c as follows:
--- audio.c.orig 2009-10-16 16:43:37.000000000 +1100
+++ audio.c 2011-12-22 18:37:47.000000000 +1100
@@ -2559,7 +2559,8 @@
if (!audio_can_playback(sc))
return EINVAL;
- if (!sc->sc_pr.mmapped && used < sc->sc_pr.blksize) {
+ if (!sc->sc_pr.mmapped && used < sc->sc_pr.blksize &&
+ sc->hw_if->trigger_output != NULL) {
wakeup(&sc->sc_wchan);
DPRINTF(("%s: wakeup and return\n", __func__));
return 0;
This means that start_output is called and audio_pint as with trigger_output.
I fixes the problem but I'm not sure I've done the right thing.
I hope this helps,
Regards,
Nat.
Home |
Main Index |
Thread Index |
Old Index