Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] ogg123 and libao sample rate error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
XelKarin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 84

PostPosted: Wed Jul 11, 2012 10:57 pm    Post subject: [SOLVED] ogg123 and libao sample rate error Reply with quote

So, I recently recompiled my system with emerge -e world. I ran into some problems with gconf (Bugs #408857 and #411237) which I managed to fix by upgrading gconf to version 3.2.5. I just discovered recently that I also have issues with ogg123. I'm not sure if this is also due to recompiling. Anyways, when trying to play a vorbis file, ogg123 gives the error ao_alsa WARNING: sample rate 44100 not supported by the hardware, using 48000. Then it continues to play the file without resampling, giving my vorbis files a higher pitch than they should have. mpg123 is able to play at 44100, but seems to use ALSA directly instead of libao. I don't know of any other software that uses libao to test with.

I did discover that if I begin playing an mp3 with mpg123, then begin playing a vorbis file with ogg123 at the same time, ogg123 gives the error ao_alsa WARNING: Unable to open surround playback. Trying default device... then begins playing the vorbis file at the normal rate. I can then stop mpg123 and listen to the vorbis track just fine.

System Info

media-sound/vorbis-tools-1.4.0
media-libs/libvorbis-1.3.3
media-libs/libao-1.1.0-r1
media-libs/alsa-lib-1.0.25-r1
media-sound/alsa-headers-1.0.25

Code:
lspci -vk -s 00:04.0

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
        Subsystem: nVidia Corporation Device cb84
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 22
        I/O ports at f000 [size=256]
        I/O ports at ec00 [size=256]
        Memory at fe02d000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: snd_intel8x0


Code:
Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.1
Timestamp of tree: Wed, 11 Jul 2012 20:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4-r1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl alsa amd64 ao apng audiofile berkdb bzip2 cairo cdparanoia cli consolekit corefonts cracklib crypt cscope cups curl cvs cxx dbus dga dia doc docbook dot dri dvd examples exif extra ffmpeg flac fontconfig gcj gd gdbm gif gmp gnutls gpg graphite graphviz gtk gudev highlight hwdb iconv icu imagemagick ipv6 jadetex java jpeg kpathsea lame latex lzma lzo mad matroska minizip mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin objc objc++ objc-gc ogg openal opengl openmp pam pango pcre pdf perl png policykit pppd python readline rtf ruby sdl session sndfile speex spell sqlite sqlite3 sse sse2 ssl subversion svg syslog tcl tcpd theora threads tiff tk truetype unicode vim-syntax vorbis webkit x264 xetex xft xml xorg xpm xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Last edited by XelKarin on Sun Jul 15, 2012 11:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
XelKarin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 84

PostPosted: Sat Jul 14, 2012 11:18 pm    Post subject: Reply with quote

I found that ogg123 is trying to use the device 'front' instead of 'default' when it's linked against libao-1.1.0.

I tried adding the following to asound.conf:
Code:
pcm.!default {
        type hw
        card 0
        device 1
}


This gets ogg123 playing at the correct sample rate, but then mpg123 begins failing with the following error:
Code:
[sdl.c:78] error: Couldn't open SDL audio: No available audio device

[audio.c:630] error: failed to open audio device
[mpg123.c:542] error: failed to reset audio device: No such file or directory


Downgrading to libao-1.0.0 allows both programs to work without any configuration changes to ALSA. This bug at the xiph tracker seems awfully similar. I'm wondering if I should open a new report or follow up with that one. Maybe someone could suggest other things I could try? I'm not all that familiar with ALSA configuration.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sun Jul 15, 2012 1:38 am    Post subject: Reply with quote

Hello,
you can choose the libao default driver by writing this line
Code:
default_driver=alsa

to ~/.libao and/or /etc/libao.conf. Then, ogg123 should follow the configuration of Alsa in ~/.asoundrc and /etc/asound.conf or the default one if none exist.
_________________
Paul
Back to top
View user's profile Send private message
XelKarin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 84

PostPosted: Sun Jul 15, 2012 11:30 pm    Post subject: Reply with quote

Alright, adding default_driver=alsa to libao.conf wasn't enough as libao was already using ALSA by default. Adding dev=default worked though. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum