From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FMiXZ-0001VU-2C for garchives@archives.gentoo.org; Fri, 24 Mar 2006 09:25:05 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.5) with SMTP id k2O9N9qW011997; Fri, 24 Mar 2006 09:23:09 GMT Received: from smtp15.wxs.nl (smtp15.wxs.nl [195.121.247.6]) by robin.gentoo.org (8.13.6/8.13.5) with ESMTP id k2O9HYtU004160 for ; Fri, 24 Mar 2006 09:17:34 GMT Received: from [10.0.0.150] (ip3e83ab52.speed.planet.nl [62.131.171.82]) by smtp15.wxs.nl (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0IWM0048ZKH9YE@smtp15.wxs.nl> for gentoo-user@lists.gentoo.org; Fri, 24 Mar 2006 10:17:34 +0100 (CET) Date: Fri, 24 Mar 2006 10:16:58 +0100 From: Holly Bostick Subject: Re: [gentoo-user] Re: mpg123: Can't open /dev/dsp! In-reply-to: <20060324025900.GA6093@waltdnes.org> To: gentoo-user@lists.gentoo.org Message-id: <4423B90A.2020002@planet.nl> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7BIT User-Agent: Thunderbird 1.5 (X11/20060319) X-Enigmail-Version: 0.94.0.0 References: <20060318220512.GA8976@waltdnes.org> <20060324025900.GA6093@waltdnes.org> X-Archives-Salt: 815d1a5a-172e-4564-84b9-f200768dd01d X-Archives-Hash: 233d32aef84881214a50ada7b1eb8d5e Walter Dnes schreef: > On Tue, Mar 21, 2006 at 08:41:44PM +0100, Simon Kellett wrote >> "Walter Dnes" 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: Advanced Linux Sound Architecture Sequencer support < > Sequencer dummy client OSS Mixer API 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