[alsa-devel] hda-intel (ALC889) - sound loops/repeats continuously, and general brokenness
Hello ALSA devs,
(Cc'ing alsa-devel since looks like it can be a driver problem/bug, but still unsure. Need some expert advice.)
I'm experiencing a lot of problems reproducing audio with an HD Audio "card" integrated on an Intel DX58SO mainboard. It happens only on this card, everything is Ok with another (USB) card.
The most visible problem is that `aplay` plays only a small fragment of audio (less than one second), then hangs and the card keeps reproducing that fragment continuously in a loop, until killed with Ctrl-C. `aplay -N` progresses, but each fragment repeats 3 times.
Doing an strace on `aplay`, it hangs here while repeating the audio fragment:
... semop(294912, {{0, 0, 0}, {0, 1, SEM_UNDO}}, 2) = 0 semop(294912, {{0, -1, SEM_UNDO|IPC_NOWAIT}}, 1) = 0 ioctl(4, 0x4122, 0x3) = 0 ioctl(4, 0x4122, 0) = 0 ioctl(4, 0x4122, 0xe4) = 0 poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}]) ioctl(4, 0x4122, 0x3) = 0 ioctl(4, 0x4122, 0xe4) = 0 ioctl(4, 0x4122, 0x1) = 0 read(3, "\6\0\0\0\1\210\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\210\377\377"..., 128) = 64 read(3, 0x7fff890f6810, 128) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1^C <unfinished ...>
Descriptor 3 is /dev/snd/timer ... Perhaps time stops progressing for the driver? `aplay -N` continues a little here because this poll() call timeouts after 1000ms, but this still repeats each fragment 3 times.
Other audio software (mplayer, amarok) can play audio almost normally, except when you pause. When paused, the same behavior happens: the last fragment of sound before pausing keeps repeating continuously until unpaused.
When the song finishes, the application (tested with mplayer) also hangs, the last fragment keeps repeating while the process is blocked here:
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(6, 0x4144^C <unfinished ...>
Descriptor 6 is /dev/snd/pcmC0D0p , and 0x4144 is SNDRV_PCM_IOCTL_DRAIN ioctl in sound/asound.h. Sometimes mplayer timeouts and reports:
[AO_ALSA] alsa-lib: pcm_hw.c:616:(snd_pcm_hw_drain) SNDRV_PCM_IOCTL_DRAIN failed (-5): Input/output error
I'm at a loss here. I have already read the sound/alsa/HD-Audio.txt and tried many of the tweaks described there, but with no luck.
Any help is greatly appreciated.
System information: http://www.alsa-project.org/db/?f=4ab249b0f301ff20260d7388432e624aa65092d6
Best regards, Juliano.
On 20.10.2010 21:40, Juliano F. Ravasi wrote:
Hello ALSA devs,
(Cc'ing alsa-devel since looks like it can be a driver problem/bug, but still unsure. Need some expert advice.)
I'm experiencing a lot of problems reproducing audio with an HD Audio "card" integrated on an Intel DX58SO mainboard. It happens only on this card, everything is Ok with another (USB) card.
The most visible problem is that `aplay` plays only a small fragment of audio (less than one second), then hangs and the card keeps reproducing that fragment continuously in a loop, until killed with Ctrl-C. `aplay -N` progresses, but each fragment repeats 3 times.
[...]
As a matter of accident, I reported a similar bug to the Ubuntu bugtracker just 30 minutes afterwards:
http://bugs.launchpad.net/ubuntu/+source/linux/+bug/664138
The error is not as bad for me, but it might be related.
Thanks,
Sören
Juliano F. Ravasi wrote:
I'm experiencing a lot of problems reproducing audio with an HD Audio "card" integrated on an Intel DX58SO mainboard. It happens only on this card, everything is Ok with another (USB) card.
The most visible problem is that `aplay` plays only a small fragment of audio (less than one second), then hangs and the card keeps reproducing that fragment continuously in a loop, until killed with Ctrl-C. `aplay -N` progresses, but each fragment repeats 3 times.
Please check in /proc/interrupts whether that interrupt actually works.
Regards, Clemens
On 10/21/2010 01:41 PM, Clemens Ladisch wrote:
Please check in /proc/interrupts whether that interrupt actually works.
There is no interrupt at all being assigned to hda_intel.
Yesterday, all of a sudden, the problem fixed itself and everything about this driver started working as expected. I restarted the driver to be sure and all problems returned. Then I noticed these two lines in the log at the time when the problem fixed itself:
hda-intel: No response from codec, disabling MSI: last cmd=0x20cb2001 hda_intel: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20cb2001
So, I added to my modprobe.conf:
options snd-hda-intel enable_msi=0 single_cmd=1
And now everything works fine and there is an hda_intel line in /proc/interrupts. I don't know what are the implications of these parameters. Particularly single_cmd seems to flag an incorrect operation of the driver. Perhaps the driver should detect and blacklist this card from MSI?
Thank you very much for your help!
Regards, Juliano.
participants (3)
-
Clemens Ladisch
-
Juliano F. Ravasi
-
Soeren D. Schulze