Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
I've previously posted under ALSA's user mailing list so to avoid the clutter, the details about what's happening is here:
http://article.gmane.org/gmane.linux.alsa.user/38258
http://article.gmane.org/gmane.linux.alsa.user/38260
There was no debug info under /proc/asound/card0/ so nothing to give from there unless you guys need something specific.
Output of alsa-debug.sh:
http://www.alsa-project.org/db/?f=26187faadd47f3626029ba667cb004e74695f2b2
aplay returns:
________________________________________________________________________
$ aplay -vv 03\ paris\ match-\ Bikeride.wav Playing WAVE '03 paris match- Bikeride.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Direct Stream Mixing PCM Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 4096 period_size : 1024 period_time : 23219 tstamp_mode : NONE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 4096 stop_threshold : 4096 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Hardware PCM card 0 'C-Media CMI8738' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 4096 period_size : 1024 period_time : 23219 tstamp_mode : ENABLE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 1 stop_threshold : 1073741824 silence_threshold: 0 silence_size : 1073741824 boundary : 1073741824 appl_ptr : 0 hw_ptr : 0 #+ | 00% _____________________________________________________________________
A message that is not in the archive (sent off-list or not yet received): CAN8ccib45znh-JbH57EhfbPNQg_fginmX9Tbr=yKMmd4D=iygQ@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): CAN8cciZkGx5XBO+u0b7V9YN8VU_rz8ckL8B=6oBFJr+-Yg8cxw@mail.gmail.com
Quoted 11 lines
I've previously posted under ALSA's user mailing list so to avoid the clutter, the details about what's happening is here:
http://article.gmane.org/gmane.linux.alsa.user/38258
http://article.gmane.org/gmane.linux.alsa.user/38260There was no debug info under
/proc/asound/card0/so nothing to give from there unless you guys need something specific.Output of
alsa-debug.sh:
http://www.alsa-project.org/db/?f=26187faadd47f3626029ba667cb004e74695f2b2
Seem cannot read valid value from register within three trials
state.CMI8738 {
control.1 {
iface PCM
device 2
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
comment {
access read
type INTEGER
count 6
range '0 - 36'
}
}
Seem bug in adding channel map to iec958 instead of analog
pcm.!default {
type plug
slave.pcm "dmixer"
}
You need asym plugin for playback and capture when overwrite pcm.default
Quoted 8 lines
Seem cannot read valid value from register within three trials
state.CMI8738 {
control.1 {[...]
Seem bug in adding channel map to iec958 instead of analog
What does that mean? What should I do with those patches? Should I apply them and try to compile the latest ALSA version?
Quoted 8 lines
pcm.!default {
type plug
slave.pcm "dmixer"
}You need asym plugin for playback and capture when overwrite pcm.default
Should I change my /etc/asound.conf like in the examples here?
http://alsa.opensrc.org/Asym
you have to dump the value of the register and increase the number of trials to find out whether you can get a valid value
Quoted 11 lines
Quoted 8 lines
state.CMI8738 {
control.1 {[...]
Seem bug in adding channel map to iec958 instead of analog
What does that mean? What should I do with those patches? Should I apply them and try to compile the latest ALSA version?
the patch did not channel map to the analog device
control.1 {
iface PCM
device 2
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
comment {
access read
type INTEGER
count 6
range '0 - 36'
}
}
!!Aplay/Arecord output
!!--------------------
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 1: CMI8738-MC6 [C-Media PCI 2nd DAC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/cards/CMI8738-MC6.conf;hb=HEAD
CMI8738-MC6.pcm.rear.0 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
device 1
}device 0 seem emulate sb16 , you need to ask the author how this driver support multi-channels
seem device 1 is used for multi-channels playback and device 2 is used for iec958
Quoted 8 lines
Quoted 8 lines
pcm.!default {
type plug
slave.pcm "dmixer"
}
Quoted 6 lines
Quoted 2 lines
You need asym plugin for playback and capture when overwrite pcm.default
Should I change my
/etc/asound.conflike in the examples here?
http://alsa.opensrc.org/Asym
yes, you need define both playback and capture if you overwrite pcm.default
since dmix does not support capture
Quoted 4 lines · Raymond Yau
you have to dump the value of the register and increase the number of trials to find out whether you can get a valid value
As shown in the bug, the register fails continuously; this is not a transient failure that could be worked around like in that commit.
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Seem bug in adding channel map to iec958 instead of analog
What does that mean?
Nothing relevant to this problem.
Quoted 1 line
Quoted 1 line
What should I do with those patches?
Nothing.
Regards,
Clemens
Quoted 2 lines
yes, you need define both playback and capture if you overwrite pcm.default since dmix does not support capture
I'm less concerned with the capture part of this card as I record audio through the mic of the webcam anyway. But having added that, it hasn't solved my previous problem with not being able to hear sounds from multiple sources, and also I can't use alsamixer now.
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Seem bug in adding channel map to iec958 instead of analog
What does that mean?
Nothing relevant to this problem.
Quoted 1 line
Quoted 1 line
What should I do with those patches?
Nothing.
So I guess that means there aren't really any solutions to my bug? What happens next? (sorry for all the annoying questions)
Quoted 1 line · andoru
So I guess that means there aren't really any solutions to my bug?
It sounds like a hardware error. You will have to replace the card.
Regards,
Clemens