ALSA and mplayer problems on IBM T43

Apr 08, 2006 01:11

If you happen to be using alsa, and sound stopped working suddenly after an upgrade (even though you have added yourself to the audio group), it could be because the Headphone Jack Sense and Line Jack Sense are set to [on] in the mixer settings. They need to be turned off. The [on] should be [off] in these two amixer output sections:

Simple mixer control 'Headphone Jack Sense',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

Simple mixer control 'Line Jack Sense',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

See Debian bug #297343 for details.

I also noticed that mplayer doesn't respond to the keyboard input if the hdaps (IBM Hard Drive Active Protection System) module is loaded on my ThinkPad.

If you move the laptop around a bit or press any keys, the output looks like this :

Opening joystick device /dev/input/js0
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing jungle.wav.
Audio file file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
alsa-init: using device default
alsa: 48000 Hz/1 channels/2 bpf/32768 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 1ch s16le (2 bytes per sample)
Video: no video
Position: 0 %
No bind found for key 'JOY_LEFT'-JOY_UP
No bind found for key 'JOY_LEFT'-JOY_UP-JOY_RIGHT
No bind found for key 'JOY_RIGHT'-JOY_UP
No bind found for key 'JOY_UP'-JOY_LEFT-JOY_RIGHT
No bind found for key 'JOY_LEFT'-JOY_UP
No bind found for key 'JOY_LEFT'-SPACE
No bind found for key 'JOY_LEFT'-SPACE
No bind found for key 'JOY_LEFT'-f
No bind found for key 'JOY_LEFT'-p
No bind found for key 'JOY_LEFT'-q
No bind found for key 'JOY_LEFT'-q
A: 12.0 (12.0) of 894.0 (14:54.0) 1.1%

MPlayer interrupted by signal 2 in module: play_audio
alsa-uninit: pcm closed

rmmod hdaps to prevent this from happening. The first few lines after removing the hdaps module and starting mplayer look like this:

Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

I did not dig into the details to figure out how hdaps is related to the joystick input and if this is what it should be doing.

Update 1: It seems the hdaps driver exposes a joystick input device and the ThinkPad can be used as a joystick by moving it around to control mplayer. Any movement of the ThinkPad (even if it were a slight shake caused by touching the keyboard) causes a joystick input event to be delivered to mplayer. Far too sensitive, I would say.

The solutions to this problem would be to:

1. rmmod hdaps (mplayer will not find a /dev/input/js0 to read from).
2. Disable mplayer's sensitivity to joystick input events. mplayer -input keylist lists all keys that can be bound to commands and the joystick specific ones are configurable in mplayer.conf or ~/.mplayer/input.conf.

Update 2: 3 and 4, thanks to Yen Yon E Mus ;)

3. Pass the -nojoystick option while invoking mplayer, i.e. as mplayer -nojoystick.
4. Add the nojoystick=yes option to your ~/.mplayer/config.

For now, option 1 seems to be the easiest because, anyway there is no way to park the hard drive even if a 'fall' is detected by hdaps.

mplayer, alsa, tech, debian, linux, hdaps, joystick

Previous post Next post
Up