* Detecting ALSA OSS emulation
@ 2003-12-08 12:06 Glenn Maynard
2003-12-09 11:26 ` Jaroslav Kysela
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Maynard @ 2003-12-08 12:06 UTC (permalink / raw)
To: alsa-devel
Is there a reliable way to find out if /dev/dsp is being handled by
ALSA? I want to be able to detect this for diagnostics. (If /dev/dsp
is ALSA, the native alsa-lib code should have been used, and something
has gone wrong.) Currently, I'm checking for the existance of
/proc/asound/version, but at least one user had a configuration where
that file existed but /dev/dsp was really OSS.
(That's what it looked like, and what he claimed, at least; I havn't
tried to reproduce that configuration, with both ALSA and OSS loaded
and only OSS actually handling sound. It's possible something else
was happening and the user was wrong.)
--
Glenn Maynard
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Detecting ALSA OSS emulation
@ 2003-12-08 12:15 p z oooo
2003-12-08 21:16 ` Glenn Maynard
0 siblings, 1 reply; 4+ messages in thread
From: p z oooo @ 2003-12-08 12:15 UTC (permalink / raw)
To: g_sf; +Cc: alsa-devel
Hi,
Probably user has normal soundcard handled by ALSA and TV card
(btaudio or saa7134) which provides only OSS drivers (warning - only
recording - not playback). TV card is default /dev/dsp (can by
changed by module option for btaudio, saa7134). For BT87x users there
is alsa driver in ALSA 1.0.0rc2 for saa7134 not.
Peter Zubaj
____________________________________
http://www.logofun.pobox.sk - urobte radost svojmu telefonu
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Detecting ALSA OSS emulation
2003-12-08 12:15 p z oooo
@ 2003-12-08 21:16 ` Glenn Maynard
0 siblings, 0 replies; 4+ messages in thread
From: Glenn Maynard @ 2003-12-08 21:16 UTC (permalink / raw)
To: alsa-devel
On Mon, Dec 08, 2003 at 01:15:18PM +0100, p z oooo wrote:
> Probably user has normal soundcard handled by ALSA and TV card
> (btaudio or saa7134) which provides only OSS drivers (warning - only
> recording - not playback). TV card is default /dev/dsp (can by
> changed by module option for btaudio, saa7134). For BT87x users there
> is alsa driver in ALSA 1.0.0rc2 for saa7134 not.
Err, no, this user's configuration didn't have a working ALSA at all.
dsnd_pcm_open returned ENOENT. His other applications were likely all
using /dev/dsp, too. However, since /proc/asound/version existed,
my code figured that ALSA was loaded and complained ("/dev/dsp? why
isn't ALSA being used?")
--
Glenn Maynard
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Detecting ALSA OSS emulation
2003-12-08 12:06 Detecting ALSA OSS emulation Glenn Maynard
@ 2003-12-09 11:26 ` Jaroslav Kysela
0 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2003-12-09 11:26 UTC (permalink / raw)
To: Glenn Maynard; +Cc: alsa-devel
On Mon, 8 Dec 2003, Glenn Maynard wrote:
> Is there a reliable way to find out if /dev/dsp is being handled by
> ALSA? I want to be able to detect this for diagnostics. (If /dev/dsp
> is ALSA, the native alsa-lib code should have been used, and something
> has gone wrong.) Currently, I'm checking for the existance of
> /proc/asound/version, but at least one user had a configuration where
> that file existed but /dev/dsp was really OSS.
>
> (That's what it looked like, and what he claimed, at least; I havn't
> tried to reproduce that configuration, with both ALSA and OSS loaded
> and only OSS actually handling sound. It's possible something else
> was happening and the user was wrong.)
We use this OSS version:
#define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */
Ok, I've just added a new ioctl for more easy and reliable checks for
mixer and pcm emulation:
#define OSS_ALSAEMULVER _SIOR ('M', 249, int)
This ioctl will return 1 as integer:
int ver;
if (ioctl(fd, OSS_ALSAEMULVER, &ver) == 0 && ver > 0)
printf("fd is ALSA's emulation handle\n");
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-09 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-08 12:06 Detecting ALSA OSS emulation Glenn Maynard
2003-12-09 11:26 ` Jaroslav Kysela
-- strict thread matches above, loose matches on Subject: below --
2003-12-08 12:15 p z oooo
2003-12-08 21:16 ` Glenn Maynard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.