[mythtv-users] audio buffer underruns [partly solved]

Ross Boylan RossBoylan at stanfordalumni.org
Sat Mar 17 23:27:46 UTC 2012


On Sun, 2012-03-18 at 07:58 +1100, Jean-Yves Avenard wrote:
> 
> 
> On Sunday, 18 March 2012, Ross Boylan <RossBoylan at stanfordalumni.org>
> wrote:
> 
> >
> > I'm pretty sure I used the same recording each time.  So why is it
> now
> > trying for 320 when before is was 192?  Does the code try
> progressively
> > larger buffer sizes til it gets where it wants to go?  If so, what
> is
> > the final size I should use?
> >
> 
> The way that figure is reported/calculated is as follow.
> Myth asks alsa for 500ms audio. Say it only gets 250ms.
> Myth looks at the size of the existing alsa kernel buffer, and sees
> that it's set to 64kB
> As myth only got half the time it wanted, it assumes the audio buffer
> should have been 128kB instead.
> 
> So myth could have guessed that you needed 192kB buffer, but alsa
> continues to return a different buffer than what we ask. So the value
> reported changes.
> 
> I wouldn't worry about it unless you do get buffer underruns. The
> message is harmless, but does help finding the cause of buffer
> underruns when they do happen.
Unfortunately, bad things continue to happen.  I was able to boost the
buffer to 320, but not to 512.  Here are the highlights when I play a
recording
2012-03-17 16:14:37.004 TV: Attempting to change from None to WatchingLiveTV
2012-03-17 16:14:37.019 MythCoreContext: Connecting to backend server: 192.168.40.2:6543 (try 1 of 1)
2012-03-17 16:14:37.020 Using protocol version 63
2012-03-17 16:14:37.097 Spawning LiveTV Recorder -- begin
2012-03-17 16:14:37.419 Spawning LiveTV Recorder -- end
2012-03-17 16:14:37.444 We have a playbackURL(/usr/local/var/media/free/1022_20120317161437.mpg) & cardtype(DUMMY)
2012-03-17 16:14:37.445 We have a RingBuffer
2012-03-17 16:14:37.753 VideoOutputXv: XVideo Adaptor Name: 'ATI Radeon AVIVO Video'
2012-03-17 16:14:37.852 OSD: Base theme size: 1280x720
2012-03-17 16:14:37.863 OSD: Scaling factors: 0.5625x0.8
2012-03-17 16:14:37.879 MythFontProperties, Error: Failed to load 'Droid Sans', got 'Bitstream Vera Sans' instead
                        Location: /usr/share/mythtv/themes/MythCenter-wide/osd.xml @ 246
                        Name: 'medium'  Type: 'fontdef'
[many similar font errors]
2012-03-17 16:14:38.088 OSD: Base theme size: 1280x720
2012-03-17 16:14:38.088 OSD: Scaling factors: 0.5625x0.8
greedyhdeint: size changed from 0 x 0 -> 720 x 576
2012-03-17 16:14:38.142 Player(0): Video timing method: USleep with busy wait
2012-03-17 16:14:38.145 TV: Changing from None to WatchingLiveTV
2012-03-17 16:14:38.145 TV: State is LiveTV & mctx == ctx
2012-03-17 16:14:38.147 TV: UpdateOSDInput done
2012-03-17 16:14:38.148 TV: UpdateLCD done
2012-03-17 16:14:38.148 TV: ITVRestart done
2012-03-17 16:14:38.160 pause_active: 0
2012-03-17 16:14:38.725 ScreenSaverX11Private: DPMS Deactivated 1
2012-03-17 16:14:41.209 OSD: Base theme size: 1280x720
2012-03-17 16:14:41.209 OSD: Scaling factors: 0.5625x0.8
2012-03-17 16:14:41.215 MythFontProperties, Error: Failed to load 'Droid Sans', got 'Bitstream Vera Sans' instead
                        Location: /usr/share/mythtv/themes/MythCenter-wide/osd.xml @ 264
                        Name: 'basesmall'       Type: 'fontdef'
2012-03-17 16:14:41.216 MythFontProperties, Error: Failed to load 'Droid Sans', got 'Bitstream Vera Sans' instead
                        Location: /usr/share/mythtv/themes/MythCenter-wide/osd.xml @ 269
                        Name: 'basesmall_normal_inactive'       Type: 'fontdef'
2012-03-17 16:14:46.632 MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
2012-03-17 16:14:46.651 MythUIWebBrowser: enabling plugins
2012-03-17 16:14:58.027 VideoOutput: Created YV12 OSD.
2012-03-17 16:15:05.675 TV: OSDDialogEvent: result 0 text OK action DIALOG_INFO_CHANNELLOCK_0
2012-03-17 16:15:06.651 TV: Attempting to change from WatchingLiveTV to None
2012-03-17 16:15:06.741 TV: Changing from WatchingLiveTV to None
2012-03-17 16:15:06.757 ScreenSaverX11Private: DPMS Reactivated 1
[not sure why it's looking for next files; it's true they aren't there]
2012-03-17 16:15:10.884 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.40.2:6543/1021_20120317155900.mpg' file not found
2012-03-17 16:15:11.079 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.40.2:6543/1021_20120317155900.mpg' file not found
2012-03-17 16:15:11.179 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.40.2:6543/1651_20120316205900.mpg' file not found
2012-03-17 16:15:11.226 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.40.2:6543/1021_20120317155900.mpg' file not found
2012-03-17 16:15:11.268 PlaybackBoxHelper Error: CHECK_AVAILABILITY 'myth://192.168.40.2:6543/1651_20120316205900.mpg' file not found
2012-03-17 16:15:15.242 TV: Attempting to change from None to WatchingPreRecorded
2012-03-17 16:15:15.666 AFD Warning: ScanATSCCaptionStreams() called with no PMT
2012-03-17 16:15:15.676 AFD: Opened codec 0xa3c1670, id(MPEG2VIDEO) type(Video)

2012-03-17 16:15:16.736 OSD: Base theme size: 1280x720
2012-03-17 16:15:16.736 OSD: Scaling factors: 1.5x1.5
2012-03-17 16:15:16.745 ALSA, Error: WriteAudio: buffer underrun
2012-03-17 16:15:16.820 Player(1): Video timing method: USleep with busy wait
2012-03-17 16:15:16.821 TV: Changing from None to WatchingPreRecorded
2012-03-17 16:15:16.871 ALSA, Error: WriteAudio: buffer underrun
2012-03-17 16:15:16.917 ALSA, Error: WriteAudio: buffer underrun
2012-03-17 16:15:16.928 ScreenSaverX11Private: DPMS Deactivated 1
2012-03-17 16:15:17.017 AFD Warning: ScanATSCCaptionStreams() called with no PMT
2012-03-17 16:15:17.029 Player(1): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAUUUUUUuULL
2012-03-17 16:15:17.038 Player(1): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAUUUUUUuULL
2012-03-17 16:15:17.047 Player(1): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAUUUUUUuULL
2012-03-17 16:15:17.056 Player(1): Waited 100ms for video buffers AAAAAAAAAAAAAAAAAAAAAUUUUUUuULL
2012-03-17 16:15:17.158 Player(1): Waited 100ms for video buffers LLAAAAAAAAAAAAAAAAAAAUUUUUUUUuU
2012-03-17 16:15:17.167 Player(1): Waited 100ms for video buffers LLAAAAAAAAAAAAAAAAAAAUUUUUUUUuU
2012-03-17 16:15:17.181 Player(1): Waited 100ms for video buffers LULAAAAAAAAAAAAAAAAAAUUUUUUUUuU
2012-03-17 16:15:17.426 VideoOutput: Created YV12 OSD.
2012-03-17 16:15:18.265 AFD Warning: ScanATSCCaptionStreams() called with no PMT
2012-03-17 16:15:20.663 Player(1): Waited 100ms for video buffers AAAAAALAAAAAAALAAAAAAAAAAAAAAAA
...
2012-03-17 16:15:23.052 Player(1): Waited 100ms for video buffers UAAUAALAUUUUUUuAUAAUAAuAAAAAAAA
2012-03-17 16:15:23.906 ALSA, Error: WriteAudio: buffer underrun
2012-03-17 16:15:23.929 AudioOutput Error: WriteAudio: device is in a bad state (state = 1)
2012-03-17 16:15:23.963 AudioOutput Error: WriteAudio: device is in a bad state (state = 1)
2012-03-17 16:15:23.963 AudioOutput Error: WriteAudio: device is in a bad state (state = 1)
2012-03-17 16:15:23.963 AudioOutput Error: WriteAudio: device is in a bad state (state = 1)
[many.  Every 2 or 300 lines there is]
2012-03-17 16:15:27.547 Player(1): Waited 100ms for video buffers UUUUUAALAALAAUAAUAAAAAAAAAAUUUU
2012-03-17 16:15:27.477 AFD Warning: ScanATSCCaptionStreams() called with no PMT


> 
> > Also, not being able to reset the sound without disabling other
> sound
> > seems like a problem if different recordings have different
> > requirements, which I gather they do.
> >
> 
> You can only modify the card if it's not in use elsewhere.
> 
> > mythtv 0.24-2.
> > linux kernel 2.6.26-2-686
> > 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High
> > Definition Audio Controller (rev 01) on motherboard.
> 
> Try upgrading your alsa drivers. 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list