mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.44k stars 2.91k forks source link

Broken ALSA output on rx51 #1231

Closed duxks closed 10 years ago

duxks commented 10 years ago

On a Nokia N900, which has the rx51 sound card (really, SoC), mpv can't play audio with the alsa ao since commit b3f9d3750b8e1e627008758181aa98a6c788e7cd.

A log of trying to play a file follows; the relevant error is (according to a bisect), "[ao/alsa] Unable to set buffer time near: Invalid argument".

I asked in IRC a while ago (near 0.4.x, when this first cropped up) and heard that this likely indicates a pretty awful sound card. I can believe that, but sadly there's no way to swap out the sound card on a SoC, and this is a really painful regression. Hopefully it isn't too painful to fix; thanks.

$ mpv -v cats.ogg 
[cplayer] mpv 0.6.2 (C) 2000-2014 mpv/MPlayer/mplayer2 projects
[cplayer]  built on 2014-10-25T15:30:40
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       54.7.100
[cplayer]    libavcodec      56.1.100
[cplayer]    libavformat     56.4.101
[cplayer]    libswscale      3.0.100
[cplayer]    libavfilter     5.1.100
[cplayer]    libavresample   2.1.0
[cplayer] 
[global] search dirs: /home/user/.mpv /etc/mpv
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'encoding-profiles.conf' -> '/etc/mpv/encoding-profiles.conf'
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] 
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config file: 'config'
[global]     -> '/home/user/.mpv/config'
[cplayer] Reading config file /home/user/.mpv/config
[cplayer] 
[cplayer] Setting option 'audio-display' = 'no' (flags = 4)
[cplayer] Setting option 'input-file' = '/home/user/.mpv/fifo' (flags = 4)
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config file: 'mpv.conf'
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-joystick --enable-zsh-comp --enable-libmpv-shared --enable-cdda --enable-portaudio
[cplayer] Command line: 'mpv' '-v' 'cats.ogg'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'input.conf' -> '(NULL)'
[input] Falling back on default (hardcoded) input config
[input/#1] Setting up LIRC support...
[input/#1] Failed to open LIRC support. You will not be able to use your remote control.
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[osc] Loading script @osc.lua...
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config file: 'lua'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'lua-settings/osc.conf' -> '(NULL)'
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading @osc.lua.
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config file: 'lua'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'watch_later/1E7DBF9809A93BD56B1276CCC9AC0A71' -> '(NULL)'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'watch_later' -> '(NULL)'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'cats.ogg.conf' -> '(NULL)'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'watch_later/1E7DBF9809A93BD56B1276CCC9AC0A71' -> '(NULL)'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'watch_later' -> '(NULL)'
[cplayer] Playing: cats.ogg
[file] Opened: [file] cats.ogg
[demux] Trying demuxer: disc (force-level: normal)
[demux] Trying demuxer: edl (force-level: normal)
[demux] Trying demuxer: cue (force-level: normal)
[demux] Trying demuxer: rawaudio (force-level: normal)
[demux] Trying demuxer: rawvideo (force-level: normal)
[demux] Trying demuxer: tv (force-level: normal)
[demux] Trying demuxer: libass (force-level: normal)
[demux] Trying demuxer: mkv (force-level: normal)
[demux] Trying demuxer: lavf (force-level: normal)
[lavf] Found 'ogg' at score=100 size=2048.
[lavf] avformat_find_stream_info() finished after 36638 bytes.
[lavf] Replaygain tags not found
[lavf] Replaygain tags not found
[demux] Detected file format: Ogg (libavformat)
[lavf] Replaygain tags not found
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[libass] Setting up fonts...
[libass] Done.
[find_subfiles] Load subtitles in .
[global] search dirs: /home/user/.mpv /etc/mpv
[global] config path: 'sub/' -> '(NULL)'
[cplayer] [stream] Audio (+) --aid=1 (vorbis)
[cplayer] File tags:
[cplayer]  ENCODER: VLC media player
[ad] Codec list:
[ad]     lavc:vorbis - Vorbis
[ad]     lavc:libvorbis (vorbis) - libvorbis
[ad] Opening audio decoder lavc:vorbis
[ad] Selected audio codec: Vorbis [lavc:vorbis]
[cplayer] Starting playback...
[cplayer] Initial audio packets read: 1
[ad] Building audio filter chain for 44100Hz stereo 2ch floatp -> 0Hz stereo 2ch ??...
[af] Audio filter chain:
[af]   [in] 44100Hz stereo 2ch floatp
[af]   [out] 44100Hz stereo 2ch floatp
[af]   [ao] 0Hz stereo 2ch ??
[ao/pulse] requested format: 44100 Hz, stereo channels, floatp
[ao/pulse] Library version: 5.0.0
[ao/pulse] Proto: 29
[ao/pulse] Server proto: 4294967295
[ao/alsa] requested format: 44100 Hz, stereo channels, floatp
[ao/alsa] using device: default
[ao/alsa] using ALSA version: 1.0.28
[ao/alsa] pcm opened in blocking mode
[ao/alsa] Unable to set buffer time near: Invalid argument
[ao/alsa] uninit: pcm closed
[ao/oss] requested format: 44100 Hz, stereo channels, floatp
[ao/oss] using '/dev/dsp' dsp device
[ao/oss] using '/dev/mixer' mixer device
[ao/oss] using 'pcm' mixer device
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
[ao/portaudio] requested format: 44100 Hz, stereo channels, floatp
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
connect(2) call to /dev/shm/jack-30000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[ao/portaudio] using soft-buffer of 8820 samples.
[cplayer] AO: [portaudio] 44100Hz stereo 2ch float
[cplayer] AO: Description: PortAudio
[ad] Building audio filter chain for 44100Hz stereo 2ch floatp -> 44100Hz stereo 2ch float...
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 44100Hz stereo 2ch floatp
[af]   [lavrresample] 44100Hz stereo 2ch float
[af]   [out] 44100Hz stereo 2ch float
[af]   [ao] 44100Hz stereo 2ch float
[statusline] A: 00:00:02 / 00:00:59 (5%)
[cplayer] EOF code: 3  
[cplayer] 
[ad] Uninit audio filters...
[af] Removing filter lavrresample 
[ad] Uninit audio decoder.
[cplayer] 
[cplayer] Exiting... (End of file)
[osc] Exiting...
ghost commented 10 years ago

OK.