* How to detect whether OSS mixer is emulated by ALSA
@ 2003-04-05 16:21 Christian Esken
2003-04-05 16:40 ` Paul Davis
2003-04-06 12:05 ` Jaroslav Kysela
0 siblings, 2 replies; 7+ messages in thread
From: Christian Esken @ 2003-04-05 16:21 UTC (permalink / raw)
To: alsa-devel
Hi,
my mixer (kmix) supports OSS and ALSA at the same time. This is good for a
mixed-mode environment (e.g. if there is a TV card w/o ALSA support).
Unfortunately this means that kmix finds some mixers twice.
- One time the real thing (ALSA)
- One time the OSS-emulation
This will confuse users.
Is there any way to find out those OSS mixers which are just emulated?
I browsed http://www.alsa-project.org/~iwai/OSS-Emulation.html and other
documentation but found nothing . I also tried to build the docs below
alsa-doc/lib, but failed (Yes, I have openjade installed).
Chris
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-05 16:21 How to detect whether OSS mixer is emulated by ALSA Christian Esken
@ 2003-04-05 16:40 ` Paul Davis
2003-04-06 12:05 ` Jaroslav Kysela
1 sibling, 0 replies; 7+ messages in thread
From: Paul Davis @ 2003-04-05 16:40 UTC (permalink / raw)
To: Christian Esken; +Cc: alsa-devel
>Hi,
>
>my mixer (kmix) supports OSS and ALSA at the same time. This is good for a
>mixed-mode environment (e.g. if there is a TV card w/o ALSA support).
>
>Unfortunately this means that kmix finds some mixers twice.
>- One time the real thing (ALSA)
>- One time the OSS-emulation
>
>This will confuse users.
>
>Is there any way to find out those OSS mixers which are just emulated?
check for the existence of /proc/asound and the absence of
/proc/sndstat. if the first is there and the second is not, then any
OSS mixers are emulated.
--p
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-05 16:21 How to detect whether OSS mixer is emulated by ALSA Christian Esken
2003-04-05 16:40 ` Paul Davis
@ 2003-04-06 12:05 ` Jaroslav Kysela
2003-04-08 18:22 ` Christian Esken
1 sibling, 1 reply; 7+ messages in thread
From: Jaroslav Kysela @ 2003-04-06 12:05 UTC (permalink / raw)
To: Christian Esken; +Cc: alsa-devel@lists.sourceforge.net
On Sat, 5 Apr 2003, Christian Esken wrote:
> Hi,
>
> my mixer (kmix) supports OSS and ALSA at the same time. This is good for a
> mixed-mode environment (e.g. if there is a TV card w/o ALSA support).
>
> Unfortunately this means that kmix finds some mixers twice.
> - One time the real thing (ALSA)
> - One time the OSS-emulation
>
> This will confuse users.
>
> Is there any way to find out those OSS mixers which are just emulated?
> I browsed http://www.alsa-project.org/~iwai/OSS-Emulation.html and other
> documentation but found nothing . I also tried to build the docs below
> alsa-doc/lib, but failed (Yes, I have openjade installed).
ALSA emulation layer always report the version of OSS mixer (OSS_GETVERSION) as:
#define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-06 12:05 ` Jaroslav Kysela
@ 2003-04-08 18:22 ` Christian Esken
2003-04-08 20:27 ` Paul Davis
0 siblings, 1 reply; 7+ messages in thread
From: Christian Esken @ 2003-04-08 18:22 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
Am Sunday 06 April 2003 14:05 schrieb Jaroslav Kysela:
> On Sat, 5 Apr 2003, Christian Esken wrote:
> > Hi,
> >
> > my mixer (kmix) supports OSS and ALSA at the same time. This is good for
> > a mixed-mode environment (e.g. if there is a TV card w/o ALSA support).
> >
> > Unfortunately this means that kmix finds some mixers twice.
> > - One time the real thing (ALSA)
> > - One time the OSS-emulation
> >
> > This will confuse users.
> >
> > Is there any way to find out those OSS mixers which are just emulated?
> > I browsed http://www.alsa-project.org/~iwai/OSS-Emulation.html and other
> > documentation but found nothing . I also tried to build the docs below
> > alsa-doc/lib, but failed (Yes, I have openjade installed).
>
> ALSA emulation layer always report the version of OSS mixer
> (OSS_GETVERSION) as:
>
> #define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /*
> 3.8.1a */
Well, how should this help?!? It reports this value for any device, whether
showing up duplicated or not. It doesn't help mapping ALSA mixers to
ALSA_OSS-Mixers, does it?
For explaining things better I'll show the log of scanning 4 (sound)cards on 2
drivers. Driver 0 (drv=0) is ALSA, Driver 1 (drv=1) is OSS:
chris@debut:~/CVS/kdemultimedia/kmix> kmix
kmix: drv=0
kmix: dev=0
kmix: card=0
kmix: Added one mixer: Sound Fusion CS46xx
kmix: card=1
kmix: card=2
kmix: card=3
kmix: dev=1
kmix: card=0
kmix: card=1
kmix: card=2
kmix: card=3
kmix: dev=2
kmix: card=0
kmix: card=1
kmix: card=2
kmix: card=3
kmix: drv=1
kmix: dev=0
kmix: card=0
Version is: 198672
kmix: Added one mixer: Cirrus Logic CS4294 rev 5,Cirru
kmix: card=1
kmix: card=2
kmix: card=3
kmix: dev=1
kmix: card=0
Version is: 198672
kmix: Added one mixer: Avance Logic ALC650 rev 0
kmix: card=1
kmix: card=2
kmix: card=3
kmix: dev=2
kmix: card=0
kmix: card=1
kmix: card=2
kmix: card=3
kmix: Mixers found: 3, multi-driver-mode: true
So I find
1) "Sound Fusion CS46xx" (ALSA) and
2) "Cirrus Logic CS4294 rev 5,Cirru" (OSS-ALSA)
3) "Avance Logic ALC650 rev 0" (OSS-ALSA)
Both 2) and 3) have version "198672", but I only need to discard 2) as this
is a duplicate of 1). How should I do this?!?
Chris
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-08 18:22 ` Christian Esken
@ 2003-04-08 20:27 ` Paul Davis
2003-04-09 9:19 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Paul Davis @ 2003-04-08 20:27 UTC (permalink / raw)
To: Christian Esken; +Cc: alsa-devel@lists.sourceforge.net
>Well, how should this help?!? It reports this value for any device, whether
>showing up duplicated or not. It doesn't help mapping ALSA mixers to
>ALSA_OSS-Mixers, does it?
>
>For explaining things better I'll show the log of scanning 4 (sound)cards on 2
although i am somewhat sympathetic to what you are trying to do, and i
agree that there should be a way to do it more easily than now, i
think that your goal is misplaced.
you need to pick an audio API, and write a mixer app that uses
it. ALSA's provision of OSS back-compatibility is not there to be used
by programs that use the native ALSA API. either use OSS, or ALSA, and
don't try both.
that's just my US$0.02, worth ever less with every bomb this country
drops on iraq.
--p
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-08 20:27 ` Paul Davis
@ 2003-04-09 9:19 ` Takashi Iwai
2003-04-09 19:46 ` Christian Esken
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2003-04-09 9:19 UTC (permalink / raw)
To: Paul Davis; +Cc: Christian Esken, alsa-devel@lists.sourceforge.net
At Tue, 08 Apr 2003 16:27:43 -0400,
Paul Davis wrote:
>
> >Well, how should this help?!? It reports this value for any device, whether
> >showing up duplicated or not. It doesn't help mapping ALSA mixers to
> >ALSA_OSS-Mixers, does it?
> >
> >For explaining things better I'll show the log of scanning 4 (sound)cards on 2
>
> although i am somewhat sympathetic to what you are trying to do, and i
> agree that there should be a way to do it more easily than now, i
> think that your goal is misplaced.
>
> you need to pick an audio API, and write a mixer app that uses
> it. ALSA's provision of OSS back-compatibility is not there to be used
> by programs that use the native ALSA API. either use OSS, or ALSA, and
> don't try both.
yep, the easiest way would be to detect the alsa mixers at first then
run kmix as alsa-native mode if any found. if no alsa mixer is found,
try to probe oss mixers and run in oss mode as fallback.
even if you want to mix up the both modes, the same rule is applied -
probe ALSA first then OSS.
the ALSA OSS-emulation maps the devices based on the card.
that is, the ALSA card #0 uses only /dev/mixer0 and /dev/amixer0
(for pcm, only /dev/pcm0 and /dev/apcm0).
hence, you can check the alsa cards at first, then skip the
corresponding oss devices.
but this won't work well if ALSA OSS-emulation is DISABLED and both
ALSA and OSS systems are running at the same time (yeah it's
possible), although this must be a veeery rare case.
ciao,
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to detect whether OSS mixer is emulated by ALSA
2003-04-09 9:19 ` Takashi Iwai
@ 2003-04-09 19:46 ` Christian Esken
0 siblings, 0 replies; 7+ messages in thread
From: Christian Esken @ 2003-04-09 19:46 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
Am Wednesday 09 April 2003 11:19 schrieben Sie:
> At Tue, 08 Apr 2003 16:27:43 -0400,
>
> Paul Davis wrote:
> > >Well, how should this help?!? It reports this value for any device,
> > > whether showing up duplicated or not. It doesn't help mapping ALSA
> > > mixers to ALSA_OSS-Mixers, does it?
> > >
> > >For explaining things better I'll show the log of scanning 4
> > > (sound)cards on 2
> >
> > although i am somewhat sympathetic to what you are trying to do, and i
> > agree that there should be a way to do it more easily than now, i
> > think that your goal is misplaced.
> >
> > you need to pick an audio API, and write a mixer app that uses
> > it. ALSA's provision of OSS back-compatibility is not there to be used
> > by programs that use the native ALSA API. either use OSS, or ALSA, and
> > don't try both.
That's the theoretical approach - and I agree with you that this is the best
way.
> yep, the easiest way would be to detect the alsa mixers at first then
> run kmix as alsa-native mode if any found. if no alsa mixer is found,
> try to probe oss mixers and run in oss mode as fallback.
That's how kmix is working since some months (years?).
OK, thanks for all your feedback. So now I know I have not missed a trivial
soulution. I'll start to think up a workaround.
Bye,
Christian
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-04-09 19:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-05 16:21 How to detect whether OSS mixer is emulated by ALSA Christian Esken
2003-04-05 16:40 ` Paul Davis
2003-04-06 12:05 ` Jaroslav Kysela
2003-04-08 18:22 ` Christian Esken
2003-04-08 20:27 ` Paul Davis
2003-04-09 9:19 ` Takashi Iwai
2003-04-09 19:46 ` Christian Esken
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.