Gentoo Archives: gentoo-user

From: Holly Bostick <motub@××××××.nl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: mpg123: Can't open /dev/dsp!
Date: Fri, 24 Mar 2006 09:25:05
Message-Id: 4423B90A.2020002@planet.nl
In Reply to: Re: [gentoo-user] Re: mpg123: Can't open /dev/dsp! by Walter Dnes
1 Walter Dnes schreef:
2 > On Tue, Mar 21, 2006 at 08:41:44PM +0100, Simon Kellett wrote
3 >> "Walter Dnes" <waltdnes@××××××××.org> writes:
4 >>
5 >>> ... mpg123 complains about not being able to open /dev/dsp ...
6 >> Does "mpg123 -a /dev/sound/dsp" work ?
7 >
8 > Nope. The only change is that now I get "Can't open
9 > /dev/sound/dsp!".
10 >
11
12 Well, my understanding (which may not be correct, but I /think/ it is)
13 is that /dev/sound/dsp is the sound sequencer created by OSS or ALSA OSS
14 emulation-- if OSS is not enabled somehow, you won't have it, and if the
15 app uses ALSA directly (and not OSS emulation), you won't use it (so you
16 won't notice it's not there).
17
18 The ebuilds seem to suggest that mpg123 uses OSS (therefore ALSA OSS
19 emulation), whereas mpg321 uses ALSA natively:
20
21
22 # $Header:
23 /var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-0.59s-r10.ebuild,v
24 1.4 2006/03/08 15:46:03 flameeyes Exp $
25
26 inherit eutils
27
28 PATCH_VER=1.5
29 S="${WORKDIR}/${PN}"
30
31 DESCRIPTION="Real Time mp3 player"
32 HOMEPAGE="http://www.mpg123.de/"
33 SRC_URI="http://www.mpg123.de/mpg123/${PN}-pre${PV}.tar.gz
34 mirror://gentoo/${P}-gentoo-${PATCH_VER}.tar.bz2"
35
36 LICENSE="as-is"
37 SLOT="0"
38 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~sparc
39 ~x86"
40 IUSE="mmx 3dnow esd nas oss"
41
42 RDEPEND="esd? ( media-sound/esound )
43 nas? ( media-libs/nas )"
44
45 # alsa-1 b0rks and it's not a simple fix
46 # alsa? ( media-libs/alsa-lib )"
47
48 Interestingly, the "alsa" USE flag is commented out, but the "IUSE="
49 variable contains OSS.
50
51 More interestingly, the mpg321 ebuild contains no listed dependencies on
52 /either/ ALSA or OSS (or any other sound server)-- which strongly
53 suggests that it's native ALSA, since that is enabled in the kernel by
54 default (whereas OSS is not), indicating that if your soundcard's kernel
55 modules load, mpg321 will work, since it seems to have no explicit
56 additional ALSA or OSS dependencies.
57
58 less /usr/portage/media-sound/mpg321/mpg321-0.2.10-r3.ebuild
59 # Copyright 1999-2005 Gentoo Foundation
60 # Distributed under the terms of the GNU General Public License v2
61 # $Header:
62 /var/cvsroot/gentoo-x86/media-sound/mpg321/mpg321-0.2.10-r3.ebuild,v
63 1.1 2005/08/29 09:48:18 flameeyes Exp $
64
65 inherit eutils
66
67 IUSE=""
68
69 DESCRIPTION="Free MP3 player, drop-in replacement for mpg123"
70 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
71 HOMEPAGE="http://sourceforge.net/projects/mpg321/"
72
73 DEPEND="media-libs/libmad
74 media-libs/libid3tag
75 >=media-libs/libao-0.8.0"
76
77 SLOT="0"
78 LICENSE="GPL-2"
79 KEYWORDS="~alpha ~amd64 -mips ~ppc ~ppc-macos ~ppc64 ~sparc ~x86"
80
81 PROVIDE="virtual/mpg123"
82
83 src_unpack() {
84
85 In any case, do you have ALSA OSS emulation enabled? This requires:
86
87 1) ALSA OSS emulation elements to be enabled in the kernel, including:
88
89 <M> Advanced Linux Sound Architecture
90 <M> Sequencer support
91 < > Sequencer dummy client
92 <M> OSS Mixer API
93 <M> OSS PCM (digital audio) API
94 [*] OSS Sequencer API
95
96 2) Your soundcard to be configured correctly in /etc/modules.d/alsa
97
98 3) the alsa-oss package (at least; there may be other associated alsa-*
99 packages necessary, but since I install all of them except alsa-driver,
100 I've never investigated which packages are actually necessary to enable
101 each area of the ALSA functionality).
102
103 If so, it _ /does/ _ work:
104
105 lsmod |grep snd_
106 snd_seq_midi 6176 0
107 snd_opl3_synth 12292 0
108 snd_seq_instr 6656 1 snd_opl3_synth
109 snd_seq_midi_emul 5504 1 snd_opl3_synth
110 snd_ainstr_fm 2176 1 snd_opl3_synth
111 ==>snd_pcm_oss 41760 0
112 ==>snd_mixer_oss 14208 2 snd_pcm_oss
113 ==>snd_seq_oss 26880 0
114 snd_seq_midi_event 5632 2 snd_seq_midi,snd_seq_oss
115 ==>snd_seq 42256 8
116 snd_seq_midi,snd_opl3_synth,snd_seq_instr,snd_seq_midi_emul,snd_seq_oss,snd_seq_midi_event
117 snd_cmipci 27552 1
118 ==>snd_pcm 69128 2 snd_pcm_oss,snd_cmipci
119 snd_page_alloc 7688 1 snd_pcm
120 snd_opl3_lib 8064 2 snd_opl3_synth,snd_cmipci
121 snd_timer 18564 3 snd_seq,snd_pcm,snd_opl3_lib
122 snd_hwdep 6560 1 snd_opl3_lib
123 snd_mpu401_uart 5504 1 snd_cmipci
124 snd_rawmidi 18336 2 snd_seq_midi,snd_mpu401_uart
125 ==>snd_seq_device 6284 6
126 snd_seq_midi,snd_opl3_synth,snd_seq_oss,snd_seq,snd_opl3_lib,snd_rawmidi
127 snd 41316 13
128 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
129
130 eix alsa-oss
131 * media-libs/alsa-oss
132 Available versions: 1.0.10-r1 ~1.0.11_rc3
133 Installed: 1.0.11_rc3
134 Homepage: http://www.alsa-project.org/
135 Description: Advanced Linux Sound Architecture OSS
136 compatibility layer.
137
138 # Alsa 0.9.X kernel modules' configuration file.
139 # $Header:
140 /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v
141 1.4 2004/11/16 01:31:22 eradicator Exp $
142
143 # ALSA portion
144 # OSS/Free portion
145
146 ##
147 ## IMPORTANT:
148 ## You need to customise this section for your specific sound card(s)
149 ## and then run `update-modules' command.
150 ## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
151 ##
152 ## ALSA portion
153 ## alias snd-card-0 snd-interwave
154 ## alias snd-card-1 snd-ens1371
155 ## OSS/Free portion
156 ## alias sound-slot-0 snd-card-0
157 ## alias sound-slot-1 snd-card-1
158 ##
159
160 # OSS/Free portion - card #1
161 ## OSS/Free portion - card #2
162 ## alias sound-service-1-0 snd-mixer-oss
163 ## alias sound-service-1-3 snd-pcm-oss
164 ## alias sound-service-1-12 snd-pcm-oss
165
166 ==> alias /dev/mixer snd-mixer-oss
167 ==> alias /dev/dsp snd-pcm-oss
168 ==> alias /dev/midi snd-seq-oss
169
170 # Set this to the correct number of cards.
171
172 # --- BEGIN: Generated by ALSACONF, do not edit. ---
173 # --- ALSACONF version 1.0.10rc3 ---
174 alias snd-card-0 snd-cmipci
175 options snd-cmipci mpu_port=0x330
176 alias sound-slot-0 snd-cmipci
177 # --- END: Generated by ALSACONF, do not edit. ---
178
179 ls /dev/sound
180 adsp audio dsp mixer sequencer sequencer2
181
182 mpg123 ./02\ -\ Always.mp3
183 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
184 Version 0.59s-r10 (2000/Oct/27). Written and copyrights by Michael Hipp.
185 Uses code from various people. See 'README' for more!
186 THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
187 Title : Always Artist: U2
188 Album : 7 Year : 2002
189 Comment: Genre : Rock
190
191 Directory: ./
192 Playing MPEG stream from 02 - Always.mp3 ...
193 Found new ID3 Header
194 MPEG 1.0 layer III, 192 kbit/s, 44100 Hz stereo
195 q^H
196 [0:17] Decoding of 02 - Always.mp3 finished.
197
198 I don't have mpg321 installed, so can't test it (but I may replace
199 mpg123 with it, since that's mpg321's purpose, apparently).
200
201 HTH,
202 Holly
203 --
204 gentoo-user@g.o mailing list