Walter Dnes schreef:
> On Tue, Mar 21, 2006 at 08:41:44PM +0100, Simon Kellett wrote
>> "Walter Dnes" <[EMAIL PROTECTED]> writes:
>> 
>>> ... mpg123 complains about not being able to open /dev/dsp ...
>> Does "mpg123 -a /dev/sound/dsp" work ?
> 
> Nope.  The only change is that now I get "Can't open 
> /dev/sound/dsp!".
> 

Well, my understanding (which may not be correct, but I /think/ it is)
is that /dev/sound/dsp is the sound sequencer created by OSS or ALSA OSS
emulation-- if OSS is not enabled somehow, you won't have it, and if the
app uses ALSA directly (and not OSS emulation), you won't use it (so you
won't notice it's not there).

The ebuilds seem to suggest that mpg123 uses OSS (therefore ALSA OSS
emulation), whereas mpg321 uses ALSA natively:


# $Header:
/var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-0.59s-r10.ebuild,v
1.4 2006/03/08 15:46:03 flameeyes Exp $

inherit eutils

PATCH_VER=1.5
S="${WORKDIR}/${PN}"

DESCRIPTION="Real Time mp3 player"
HOMEPAGE="http://www.mpg123.de/";
SRC_URI="http://www.mpg123.de/mpg123/${PN}-pre${PV}.tar.gz
        mirror://gentoo/${P}-gentoo-${PATCH_VER}.tar.bz2"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~sparc
~x86"
IUSE="mmx 3dnow esd nas oss"

RDEPEND="esd? ( media-sound/esound )
        nas? ( media-libs/nas )"

# alsa-1 b0rks and it's not a simple fix
#        alsa? ( media-libs/alsa-lib )"

Interestingly, the "alsa" USE flag is commented out, but the "IUSE="
variable contains OSS.

More interestingly, the mpg321 ebuild contains no listed dependencies on
/either/ ALSA or OSS (or any other sound server)-- which strongly
suggests that it's native ALSA, since that is enabled in the kernel by
default (whereas OSS is not), indicating that if your soundcard's kernel
modules load, mpg321 will work, since it seems to have no explicit
additional ALSA or OSS dependencies.

less /usr/portage/media-sound/mpg321/mpg321-0.2.10-r3.ebuild
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
/var/cvsroot/gentoo-x86/media-sound/mpg321/mpg321-0.2.10-r3.ebuild,v
1.1 2005/08/29 09:48:18 flameeyes Exp $

inherit eutils

IUSE=""

DESCRIPTION="Free MP3 player, drop-in replacement for mpg123"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
HOMEPAGE="http://sourceforge.net/projects/mpg321/";

DEPEND="media-libs/libmad
        media-libs/libid3tag
        >=media-libs/libao-0.8.0"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 -mips ~ppc ~ppc-macos ~ppc64 ~sparc ~x86"

PROVIDE="virtual/mpg123"

src_unpack() {

In any case, do you have ALSA OSS emulation enabled? This requires:

1) ALSA OSS emulation elements to be enabled in the kernel, including:

<M> Advanced Linux Sound Architecture
<M> Sequencer support
< >   Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
[*] OSS Sequencer API

2) Your soundcard to be configured correctly in /etc/modules.d/alsa

3) the alsa-oss package (at least; there may be other associated alsa-*
packages necessary, but since I install all of them except alsa-driver,
I've never investigated which packages are actually necessary to enable
each area of the ALSA functionality).

If so, it _ /does/ _ work:

lsmod |grep snd_
snd_seq_midi            6176  0
snd_opl3_synth         12292  0
snd_seq_instr           6656  1 snd_opl3_synth
snd_seq_midi_emul       5504  1 snd_opl3_synth
snd_ainstr_fm           2176  1 snd_opl3_synth
==>snd_pcm_oss            41760  0
==>snd_mixer_oss          14208  2 snd_pcm_oss
==>snd_seq_oss            26880  0
snd_seq_midi_event      5632  2 snd_seq_midi,snd_seq_oss
==>snd_seq                42256  8
snd_seq_midi,snd_opl3_synth,snd_seq_instr,snd_seq_midi_emul,snd_seq_oss,snd_seq_midi_event
snd_cmipci             27552  1
==>snd_pcm                69128  2 snd_pcm_oss,snd_cmipci
snd_page_alloc          7688  1 snd_pcm
snd_opl3_lib            8064  2 snd_opl3_synth,snd_cmipci
snd_timer              18564  3 snd_seq,snd_pcm,snd_opl3_lib
snd_hwdep               6560  1 snd_opl3_lib
snd_mpu401_uart         5504  1 snd_cmipci
snd_rawmidi            18336  2 snd_seq_midi,snd_mpu401_uart
==>snd_seq_device          6284  6
snd_seq_midi,snd_opl3_synth,snd_seq_oss,snd_seq,snd_opl3_lib,snd_rawmidi
snd                    41316  13
snd_opl3_synth,snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_cmipci,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device

 eix alsa-oss
* media-libs/alsa-oss
     Available versions:  1.0.10-r1 ~1.0.11_rc3
     Installed:           1.0.11_rc3
     Homepage:            http://www.alsa-project.org/
     Description:         Advanced Linux Sound Architecture OSS
compatibility layer.

# Alsa 0.9.X kernel modules' configuration file.
# $Header:
/var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v
1.4 2004/11/16 01:31:22 eradicator Exp $

# ALSA portion
# OSS/Free portion

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
## alias snd-card-0 snd-interwave
## alias snd-card-1 snd-ens1371
##  OSS/Free portion
## alias sound-slot-0 snd-card-0
## alias sound-slot-1 snd-card-1
##

# OSS/Free portion - card #1
##  OSS/Free portion - card #2
## alias sound-service-1-0 snd-mixer-oss
## alias sound-service-1-3 snd-pcm-oss
## alias sound-service-1-12 snd-pcm-oss

==> alias /dev/mixer snd-mixer-oss
==> alias /dev/dsp snd-pcm-oss
==> alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.10rc3 ---
alias snd-card-0 snd-cmipci
options snd-cmipci mpu_port=0x330
alias sound-slot-0 snd-cmipci
# --- END: Generated by ALSACONF, do not edit. ---

ls /dev/sound
adsp  audio  dsp  mixer  sequencer  sequencer2

mpg123 ./02\ -\ Always.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59s-r10 (2000/Oct/27). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title  : Always                          Artist: U2
Album  : 7                               Year  : 2002
Comment:          Genre : Rock

Directory: ./
Playing MPEG stream from 02 - Always.mp3 ...
Found new ID3 Header
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz stereo
q^H
[0:17] Decoding of 02 - Always.mp3 finished.

I don't have mpg321 installed, so can't test it (but I may replace
mpg123 with it, since that's mpg321's purpose, apparently).

HTH,
Holly
-- 
gentoo-user@gentoo.org mailing list

Reply via email to