Skip to contentSkip to conversation

: EPIPE on Audigy with surround sound when seeking in 6 channel sound file

ALSA - driver 0001938 Robert Hardy 2 participants 9 messages Mar 29, 2006 – Mar 31, 2006 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

For some reason I can't comment on an existing bug which I didn't author. Perhaps this requires a higher level of access?

I'm user rhardy on Mantis...

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

Two possibilities exist:
1. I missed some of the changes tiwai made. Please point out what if this is the case.

2. It really isn't fixed in alsa-lib CVS (or isn't visible in viewcvs.)

Testing out the recent changes made by tiwai here:
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-lib/src/pcm/?sortby=date#dirlist

I took alsa-lib-1.0.11rc4 and applied patches extracted from view cvs above to update the follow files to the listed versions below:

pcm_dmix.c: 1.102
pcm_plugin.h: 1.41
pcm.c: 1.328
pcm_hw.c: 1.149
pcm_rate.c: 1.113
pcm_direct.c: 1.60
pcm_plugin.c: 1.101
pcm_softvol.c: 1.18

This is the resulting patch:
http://webcon.ca/~rhardy/patches/alsa-lib-1.0.11rc4-pcm_fixes.patch.gz

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001
Flags: bus master, medium devsel, latency 32, IRQ 201 I/O ports at a000 [size=64]
Capabilities: [dc] Power Management version 2

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

After applying the patch above and upgrading alsa-lib, I still get the same errors from mplayer when I try to seek 6 channel audio using surround51:

alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match \
with appl_ptr (216531) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match \
with appl_ptr (216531) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard

[same 3 lines repeat forever at 100% cpu usage until I kill mplayer]

Regards,
Rob

Signature · 10 lines
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems                  C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca    GPG Key available          (613) 276-7327


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
#1 lore raw

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 44 lines · Robert Hardy

For some reason I can't comment on an existing bug which I didn't author. Perhaps this requires a higher level of access?

I'm user rhardy on Mantis...

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

Two possibilities exist:
1. I missed some of the changes tiwai made. Please point out what if this is the case.

2. It really isn't fixed in alsa-lib CVS (or isn't visible in viewcvs.)

Testing out the recent changes made by tiwai here:
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-lib/src/pcm/?sortby=date#dirlist

I took alsa-lib-1.0.11rc4 and applied patches extracted from view cvs above to update the follow files to the listed versions below:

pcm_dmix.c: 1.102
pcm_plugin.h: 1.41
pcm.c: 1.328
pcm_hw.c: 1.149
pcm_rate.c: 1.113
pcm_direct.c: 1.60
pcm_plugin.c: 1.101
pcm_softvol.c: 1.18

This is the resulting patch:
http://webcon.ca/~rhardy/patches/alsa-lib-1.0.11rc4-pcm_fixes.patch.gz

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001
Flags: bus master, medium devsel, latency 32, IRQ 201 I/O ports at a000 [size=64]
Capabilities: [dc] Power Management version 2

Quoted 4 lines

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#2 lore raw

At Thu, 30 Mar 2006 11:45:09 +0200,

Quoted 47 lines · I wrote:

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 44 lines · Robert Hardy

For some reason I can't comment on an existing bug which I didn't author. Perhaps this requires a higher level of access?

I'm user rhardy on Mantis...

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

Two possibilities exist:
1. I missed some of the changes tiwai made. Please point out what if this is the case.

2. It really isn't fixed in alsa-lib CVS (or isn't visible in viewcvs.)

Testing out the recent changes made by tiwai here:
http://cvs.sourceforge.net/viewcvs.py/alsa/alsa-lib/src/pcm/?sortby=date#dirlist

I took alsa-lib-1.0.11rc4 and applied patches extracted from view cvs above to update the follow files to the listed versions below:

pcm_dmix.c: 1.102
pcm_plugin.h: 1.41
pcm.c: 1.328
pcm_hw.c: 1.149
pcm_rate.c: 1.113
pcm_direct.c: 1.60
pcm_plugin.c: 1.101
pcm_softvol.c: 1.18

This is the resulting patch:
http://webcon.ca/~rhardy/patches/alsa-lib-1.0.11rc4-pcm_fixes.patch.gz

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001
Flags: bus master, medium devsel, latency 32, IRQ 201 I/O ports at a000 [size=64]
Capabilities: [dc] Power Management version 2

Quoted 7 lines
Quoted 4 lines

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Maybe a dumb question: Did you properly install 32bit library?

I often compile/install 64bit lib for debugging 32bit problems, and throw precious hours aways...

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#3 lore raw
Quoted 19 lines · Takashi Iwai

At Thu, 30 Mar 2006 11:45:09 +0200,

Quoted 17 lines

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 15 lines · Robert Hardy

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Quoted 7 lines
Quoted 2 lines

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Maybe a dumb question: Did you properly install 32bit library?

I often compile/install 64bit lib for debugging 32bit problems, and throw precious hours aways...

I rolled those patches into my alsa-lib rpm before I tested them. Both my i686 and x86_64 rpms have the patches. My currrent system has:

Quoted 1 line

rpm -qa --qf='%{name}-%{version}-%{release}-%{arch}\n' | grep alsa

alsa-lib-devel-1.0.11-3.rc4.2.el4-x86_64
alsa-utils-1.0.11-2.rc4.1.el4-x86_64
alsa-lib-1.0.11-3.rc4.2.el4-i686
alsa-lib-devel-1.0.11-3.rc4.2.el4-i686
alsa-lib-1.0.11-3.rc4.2.el4-x86_64

Wanting to make sure it wasn't some how getting confused by the x86_64 libraries, I just now tested only the i686 rpms in my chrooted el4 i386 environment and the same problem happened.

In Chroot> rpm -qa --qf='%{name}-%{version}-%{release}-%{arch}\n' | grep alsa alsa-utils-1.0.11-2.rc4.1.el4-i686 alsa-lib-devel-1.0.11-3.rc4.2.el4-i686 alsa-lib-1.0.11-3.rc4.2.el4-i686

Regards,
Rob

Signature · 10 lines
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems                  C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca    GPG Key available          (613) 276-7327


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
#4 lore raw

At Thu, 30 Mar 2006 11:25:08 -0500 (EST),

Quoted 39 lines · Robert Hardy
Quoted 19 lines · Takashi Iwai

At Thu, 30 Mar 2006 11:45:09 +0200,

Quoted 17 lines

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 15 lines · Robert Hardy

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Quoted 7 lines
Quoted 2 lines

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Maybe a dumb question: Did you properly install 32bit library?

I often compile/install 64bit lib for debugging 32bit problems, and throw precious hours aways...

I rolled those patches into my alsa-lib rpm before I tested them. Both my i686 and x86_64 rpms have the patches. My currrent system has:

Quoted 1 line

rpm -qa --qf='%{name}-%{version}-%{release}-%{arch}\n' | grep alsa

alsa-lib-devel-1.0.11-3.rc4.2.el4-x86_64
alsa-utils-1.0.11-2.rc4.1.el4-x86_64
alsa-lib-1.0.11-3.rc4.2.el4-i686
alsa-lib-devel-1.0.11-3.rc4.2.el4-i686
alsa-lib-1.0.11-3.rc4.2.el4-x86_64

Quoted 3 lines

Wanting to make sure it wasn't some how getting confused by the x86_64 libraries, I just now tested only the i686 rpms in my chrooted el4 i386 environment and the same problem happened.

OK, which problem exactly? All tests failed?

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#5 lore raw
Quoted 39 lines · Takashi Iwai
Quoted 38 lines · At Thu, 30 Mar 2006 11:25:08 -0500 (EST),> Robert Hardy wrote:
Quoted 19 lines · Takashi Iwai

At Thu, 30 Mar 2006 11:45:09 +0200,

Quoted 17 lines

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 15 lines · Robert Hardy

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Quoted 7 lines
Quoted 2 lines

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Maybe a dumb question: Did you properly install 32bit library?

I often compile/install 64bit lib for debugging 32bit problems, and throw precious hours aways...

I rolled those patches into my alsa-lib rpm before I tested them. Both my i686 and x86_64 rpms have the patches. My currrent system has:

Quoted 1 line

rpm -qa --qf='%{name}-%{version}-%{release}-%{arch}\n' | grep alsa

alsa-lib-devel-1.0.11-3.rc4.2.el4-x86_64
alsa-utils-1.0.11-2.rc4.1.el4-x86_64
alsa-lib-1.0.11-3.rc4.2.el4-i686
alsa-lib-devel-1.0.11-3.rc4.2.el4-i686
alsa-lib-1.0.11-3.rc4.2.el4-x86_64

Quoted 5 lines
Quoted 3 lines

Wanting to make sure it wasn't some how getting confused by the x86_64 libraries, I just now tested only the i686 rpms in my chrooted el4 i386 environment and the same problem happened.

OK, which problem exactly? All tests failed?

cd /el4_i386_chroot
setarch i386 chroot .

# mplayer -vo xv -ao alsa -channels 6 An_AC3_movie.avi |& less

MPlayer dev-Fedora-GS-CVS-060328-14:45-3.4.5 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo (Family: 15, Stepping: 0)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing An_AC3_movie.avi.
AVI file format detected.
VIDEO: [XVID] 640x272 12bpp 25.000 fps 861.2 kbps (105.1 kbyte/s)
Clip info:
Software: Nandub v1.0rc2
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe) 48000 Hz 448.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, s16le, 448.0 kbit/9.72% (ratio: 56000->576000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
alsa-init: using device surround51
alsa: 48000 Hz/6 channels/12 bpf/196608 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa] 48000Hz 6ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 640 x 272 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.35:1 - prescaling to correct movie aspect.
VO: [xv] 640x272 => 640x272 Planar YV12
[ a bunch of position info trimmed ]
[ attempt to seek with right arrow ]
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
[ mplayer hangs w/ 100% cpu usage; same 3 messages repeat forever until mplayer is killed ]

Is there some way I can comment directly on bug 1938 in Mantis?

We seem to lose context in email (and Mantis doesn't seem to let me comment)?

Regards,
Rob

Signature · 10 lines
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems                  C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca    GPG Key available          (613) 276-7327


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
#6 lore raw

At Thu, 30 Mar 2006 12:09:06 -0500 (EST),

Quoted 81 lines · Robert Hardy
Quoted 39 lines · Takashi Iwai
Quoted 38 lines · At Thu, 30 Mar 2006 11:25:08 -0500 (EST),> Robert Hardy wrote:
Quoted 19 lines · Takashi Iwai

At Thu, 30 Mar 2006 11:45:09 +0200,

Quoted 17 lines

At Wed, 29 Mar 2006 17:18:59 -0500 (EST),

Quoted 15 lines · Robert Hardy

Basically I was trying to point out I am also affected by this bug:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1938

This unfortunately made no difference here. I'm running 2.6.16-rh3 which is 2.6.16.1 with custom patches including the recent git commit for [ALSA] version 1.0.11rc4 from here:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c2e02750b992703a8a18634e08b04353face243

My sound card:
02:07.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs: Unknown device 1001

This card once worked fine unfortunately I'm not sure with what mplayer/alsa-lib/alsa-driver/kernel....

I'm running a i686/32bit mplayer in a 64 bit environment.

Quoted 7 lines
Quoted 2 lines

Strange. It works fine on my test syetm now with 32bit mplayer on 64bit kernel.

Maybe a dumb question: Did you properly install 32bit library?

I often compile/install 64bit lib for debugging 32bit problems, and throw precious hours aways...

I rolled those patches into my alsa-lib rpm before I tested them. Both my i686 and x86_64 rpms have the patches. My currrent system has:

Quoted 1 line

rpm -qa --qf='%{name}-%{version}-%{release}-%{arch}\n' | grep alsa

alsa-lib-devel-1.0.11-3.rc4.2.el4-x86_64
alsa-utils-1.0.11-2.rc4.1.el4-x86_64
alsa-lib-1.0.11-3.rc4.2.el4-i686
alsa-lib-devel-1.0.11-3.rc4.2.el4-i686
alsa-lib-1.0.11-3.rc4.2.el4-x86_64

Quoted 5 lines
Quoted 3 lines

Wanting to make sure it wasn't some how getting confused by the x86_64 libraries, I just now tested only the i686 rpms in my chrooted el4 i386 environment and the same problem happened.

OK, which problem exactly? All tests failed?

cd /el4_i386_chroot
setarch i386 chroot .

# mplayer -vo xv -ao alsa -channels 6 An_AC3_movie.avi |& less

MPlayer dev-Fedora-GS-CVS-060328-14:45-3.4.5 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo (Family: 15, Stepping: 0)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing An_AC3_movie.avi.
AVI file format detected.
VIDEO: [XVID] 640x272 12bpp 25.000 fps 861.2 kbps (105.1 kbyte/s) Clip info:
Software: Nandub v1.0rc2
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52 Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe) 48000 Hz 448.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, s16le, 448.0 kbit/9.72% (ratio: 56000->576000) Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
alsa-init: using device surround51
alsa: 48000 Hz/6 channels/12 bpf/196608 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 6ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 640 x 272 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)

Quoted 8 lines

Movie-Aspect is 2.35:1 - prescaling to correct movie aspect.
VO: [xv] 640x272 => 640x272 Planar YV12
[ a bunch of position info trimmed ]
[ attempt to seek with right arrow ]
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)

That looks bad. Could you set $LIBASOUND_DEBUG=2 and run it from gdb? It will send abort() at that place, then you can see backtrace what is the original caller.

does it happen if you play via aplay like

% aplay -Dplug:surround51 some.wav

too?

Quoted 1 line

Is there some way I can comment directly on bug 1938 in Mantis?

I don't know. I heard it should be fixed now.

Quoted 1 line

We seem to lose context in email (and Mantis doesn't seem to let me comment)?

Honestly, I hate bugtracking systems. Bug reports and communcations on ML motivates me much better :)

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

At Thu, 30 Mar 2006 18:53:23 -0500 (EST),

Quoted 43 lines · Robert Hardy
Quoted 14 lines · Takashi Iwai
Quoted 5 lines · Robert Hardy

cd /el4_i386_chroot
setarch i386 chroot .

# mplayer -vo xv -ao alsa -channels 6 An_AC3_movie.avi |& less
Quoted 7 lines

MPlayer dev-Fedora-GS-CVS-060328-14:45-3.4.5 (C) 2000-2006 MPlayer Team
[...]
[ attempt to seek with right arrow ]
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)

Quoted 7 lines

That looks bad. Could you set $LIBASOUND_DEBUG=2 and run it from gdb? It will send abort() at that place, then you can see backtrace what is the original caller.

does it happen if you play via aplay like
% aplay -Dplug:surround51 some.wav
too?

No it only happens when I seek 6 channel audio. I can play something with mplayer -ao alsa -channels 6 and it will play fine _UNTIL_ I seek. Then it blows up.

So something like this will immediately fail:
mplayer -ao alsa -channels 6 -ss 00:01:00 An_AC3_movie.avi

With this stuff:
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard

If I switch to a 64 bit chrooted environment with a 64 bit mplayer the audio works properly. But then I can't use any of the 32 bit codecs.

Quoted 3 lines
Quoted 1 line

Is there some way I can comment directly on bug 1938 in Mantis?

I don't know. I heard it should be fixed now.

Quoted 8 lines

The author of the bug seems to think it's still broken and seems to have beat me to posting a backtrace. It's been a busy day here. If you still want me to do this let me know.

Quoted 2 lines

Honestly, I hate bugtracking systems. Bug reports and communcations on ML motivates me much better :)

k email it is 8o) I'd love to get this fixed...

I think I got it. It looks like the old applptr that are not updated by the prepare call due to pcm links.

Try the patch below.

Takashi

Index: alsa-lib/src/pcm/pcm_hw.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-lib/src/pcm/pcm_hw.c,v retrieving revision 1.114

src/pcm/pcm_hw.c +6 -0
diff -u -r1.114 pcm_hw.c
@@ -624,6 +624,9 @@
 		SYSMSG("SNDRV_PCM_IOCTL_REWIND failed");
 		return err;
 	}
+	err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
+	if (err < 0)
+		return err;
 	return frames;
 }
 
@@ -637,6 +640,9 @@
 			SYSMSG("SNDRV_PCM_IOCTL_FORWARD failed");
 			return err;
 		}
+		err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
+		if (err < 0)
+			return err;
 		return frames;
 	} else {
 		snd_pcm_sframes_t avail;

Index: alsa-lib/src/pcm/pcm_multi.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-lib/src/pcm/pcm_multi.c,v retrieving revision 1.72

src/pcm/pcm_multi.c +4 -4
diff -u -r1.72 pcm_multi.c
@@ -424,8 +424,9 @@
 	int err = 0;
 	unsigned int i;
 	for (i = 0; i < multi->slaves_count; ++i) {
-		if (multi->slaves[i].linked)
-			continue;
+		/* We call prepare to each slave even if it's linked.
+		 * This is to make sure to sync non-mmaped control/status.
+		 */
 		err = snd_pcm_prepare(multi->slaves[i].pcm);
 		if (err < 0)
 			return err;
@@ -439,8 +440,7 @@
 	int err = 0;
 	unsigned int i;
 	for (i = 0; i < multi->slaves_count; ++i) {
-		if (multi->slaves[i].linked)
-			continue;
+		/* Reset each slave, as well as in prepare */
 		err = snd_pcm_reset(multi->slaves[i].pcm);
 		if (err < 0)
 			return err;

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#9 lore raw
Quoted 20 lines · Takashi Iwai
Quoted 19 lines · Robert Hardy

No it only happens when I seek 6 channel audio. I can play something with mplayer -ao alsa -channels 6 and it will play fine _UNTIL_ I seek. Then it blows up.

So something like this will immediately fail:
mplayer -ao alsa -channels 6 -ss 00:01:00 An_AC3_movie.avi

With this stuff:
alsa-lib: pcm.c:6300:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (291840) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard

If I switch to a 64 bit chrooted environment with a 64 bit mplayer the audio works properly. But then I can't use any of the 32 bit codecs.

Quoted 3 lines
Quoted 1 line

Is there some way I can comment directly on bug 1938 in Mantis?

I don't know. I heard it should be fixed now.

Quoted 8 lines
Quoted 3 lines

The author of the bug seems to think it's still broken and seems to have beat me to posting a backtrace. It's been a busy day here. If you still want me to do this let me know.

I think I got it. It looks like the old applptr that are not updated by the prepare call due to pcm links.

Try the patch below.

*smiles happily*

Your two most recently patches creating the files below fixed my seeking problems and likely closes bug 1938 on Mantis too.

Thanks a lot for your help!

RCS file: /home/iwai/cvs/alsa/alsa-lib/src/pcm/pcm_hw.c,v retrieving revision 1.114

RCS file: /home/iwai/cvs/alsa/alsa-lib/src/pcm/pcm_multi.c,v retrieving revision 1.72

Regards,
Rob

Signature · 10 lines
---------------------"Happiness is understanding."----------------------
Robert Hardy, B.Eng Computer Systems                  C.E.O. Webcon Inc.
rhardy <at> webcon <dot> ca    GPG Key available          (613) 276-7327


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642