Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 193768
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo ALSA team <alsa-bugs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sybolt de Boer <sybolt@xs4all.nl>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 193768 depends on: Show dependency tree
Bug 193768 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-09-25 16:56 0000
When media-libs/speex is installed, media-plugins/alsa-plugins links 
/usr/lib/alsa/libasound_module_rate_speexrate.so with the system libspeex,
resulting in an unusable rate converter.

Reproducible: Always

Steps to Reproduce:
1.make sure media-libs/speex is installed
2.(Re)emerge media-plugins/alsa-plugins
3.echo "defaults.pcm.rate_converter \"speexrate\"" >> .asoundrc
4.mpg123 some_mp3.mp3
Actual Results:  
I hear nothing because mpg123 segfaults:
<snipped>
ALSA lib pcm_rate.c:1381:(snd_pcm_rate_open) Cannot find rate converter
zsh: segmentation fault  mpg123


Expected Results:  
a 44.1kHz mp3 should be automatically upmixed by dmix to 48kHz on a dmixed
soundcard (by default any soundcard that doesn't do hardware mixing)
I expect to hear music.

The fix is simple: add the line 
--with-speex=builtin \
to econf in the ebuild, and media-plugins/alsa-plugins won't pick up the system
libspeex, and build a working libasound_module_rate_speexrate.so.
Alternatively, adding
--with-speex=no \
instead will also fix the problem, by not building the speex rate converter at
all.

------- Comment #1 From Samuli Suominen 2007-09-25 18:33:57 0000 -------
media-lib/speex-1.2_beta2? If yes, does it work if you build it with
USE="wideband"? If no, ignore this message.

------- Comment #2 From Sybolt de Boer 2007-09-25 19:11:16 0000 -------
(In reply to comment #1)
> media-lib/speex-1.2_beta2? If yes, does it work if you build it with
> USE="wideband"? If no, ignore this message.
> 

I am on ~x86, and yes, I am media-libs/speex-1.2_beta2 (along with
media-plugins/alsa-plugins-1.0.14). Reemerging speex with USE="wideband"
produces the same result. Regards, Sybolt

------- Comment #3 From Sybolt de Boer 2007-09-25 19:47:05 0000 -------
Just tested reverting media-libs/speex-1.2_beta2 to media-libs/speex-1.1.12.
This fixes the issue, so the problem is a speex API change. Anyway, I believe
media-plugins/alsa-plugins needs to do one of 3 things:

1. disable the speex rate converter (--with-speex=no)
2. explicitly enable the builtin rate converter (--with-speex=buitin)
3. add a dependency on media-libs/speex (and --with-speex=lib)

Although the last option will not produce a working rate converter until
alsa-plugins is updated upstream to work with new speex. Regards, Sybolt

------- Comment #4 From Samuli Suominen 2007-09-25 20:25:35 0000 -------
In fact, alsa-plugins-1.0.15_rc1 is out and configure.in has:

[ snip ]

if test "$PPH" = "lib"; then
        PKG_CHECK_MODULES(speex, [speex >= 1.2], [USE_LIBSPEEX="yes"],
[USE_LIBS
PEEX=""])
        if test "$USE_LIBSPEEX" = "yes"; then
                AC_CHECK_LIB([speex], [speex_resampler_init],
                        [USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
        fi
        if test "$USE_LIBSPEEX" = "yes"; then
                AC_DEFINE(USE_LIBSPEEX, 1, "Link with libspeex for resampler")
        else
                echo "No libspeex with resampler unit; use built-in code"
                PPH="builtin"
        fi
fi

[ snip ]

So it's been updated to check for speex version 1.2 which has "A new resampler
module has been added, providing arbitrary sampling rate conversion -- fast."
from www.speex.org.

Funny thing is, speex 1.2 is not out yet and latest is still 1.2_beta2 so they
are depending on version control sources of upcoming speex release.

# pkg-config --modversion speex
1.2beta2

------- Comment #5 From Christian Heim (RETIRED) 2007-10-20 15:46:46 0000 -------
Thanks to Diego and Sybolt, I just committed a fixed ebuild. For future use, if
you want the speex rate convertor, you need to add USE=speex to either
package.use or your global USE list.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug