Skip to contentSkip to conversation

OSS emulation question

DISCUSSION Adrian McMenamin 2 participants 6 messages Mar 29, 2006 – Apr 1, 2006

lore
Share & tools
lore
#0 lore raw

My mixer code is currently not working because my device does not report the availability of SOUND_MASK_VOLUME to the oss emulation code.

In the olden days I'd just write the ioctl - presumably I don't have to do that with ALSA? How do I get round it?

Thanks

Adrian

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#1 lore raw
Quoted 2 lines · Adrian McMenamin

My mixer code is currently not working because my device does not report the availability of SOUND_MASK_VOLUME to the oss emulation code.

ALSA's OSS emulation automatically computed the mask value.

Quoted 2 lines

In the olden days I'd just write the ioctl - presumably I don't have to do that with ALSA? How do I get round it?

See snd_mixer_oss_build() in core/oss/mixer_oss.c for a list of mixer control names that get mapped to OSS controls (e.g., "Master Playback Volume"/"...Switch" would be mapped to SOUND_MIXER_VOLUME).

HTH
Clemens

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#2 lore raw
Quoted 4 lines · Clemens Ladisch
Quoted 2 lines · Adrian McMenamin

My mixer code is currently not working because my device does not report the availability of SOUND_MASK_VOLUME to the oss emulation code.

Quoted 10 lines

ALSA's OSS emulation automatically computed the mask value.

Quoted 2 lines

In the olden days I'd just write the ioctl - presumably I don't have to do that with ALSA? How do I get round it?

See snd_mixer_oss_build() in core/oss/mixer_oss.c for a list of mixer control names that get mapped to OSS controls (e.g., "Master Playback Volume"/"...Switch" would be mapped to SOUND_MIXER_VOLUME).

I have implemented master volume and master switch but all I get is:

audio/gain: setable Volume/PCM-Level not supported by your audio device:
0000

what is the minimum set of controls I need to have settable volume in /dev/mixer (ie oss emulation)?

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#3 lore raw
Quoted 5 lines · Adrian McMenamin
Quoted 3 lines · Clemens Ladisch

See snd_mixer_oss_build() in core/oss/mixer_oss.c for a list of mixer control names that get mapped to OSS controls (e.g., "Master Playback Volume"/"...Switch" would be mapped to SOUND_MIXER_VOLUME).

Quoted 7 lines

I have implemented master volume and master switch but all I get is:

audio/gain: setable Volume/PCM-Level not supported by your audio device:
0000

what is the minimum set of controls I need to have settable volume in /dev/mixer (ie oss emulation)?

One control should be enough.

What are the contents of /proc/asound/cardX/oss_mixer? (You can change mappings, see Documentation/OSS-Emulation.txt)

Regards,
Clemens

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#4 lore raw
Quoted 11 lines · Clemens Ladisch
Quoted 10 lines · Adrian McMenamin
Quoted 3 lines · Clemens Ladisch

See snd_mixer_oss_build() in core/oss/mixer_oss.c for a list of mixer control names that get mapped to OSS controls (e.g., "Master Playback Volume"/"...Switch" would be mapped to SOUND_MIXER_VOLUME).

I have implemented master volume and master switch but all I get is:

audio/gain: setable Volume/PCM-Level not supported by your audio device:
0000

Quoted 6 lines
Quoted 2 lines

what is the minimum set of controls I need to have settable volume in /dev/mixer (ie oss emulation)?

One control should be enough.

What are the contents of /proc/asound/cardX/oss_mixer?

Doesn't look good....

/proc/asound/card0 # cat oss_mixer
VOLUME "" 0
BASS "" 0
TREBLE "" 0
SYNTH "" 0
PCM "" 0
SPEAKER "" 0
LINE "" 0
MIC "" 0
CD "" 0
IMIX "" 0
ALTPCM "" 0
RECLEV "" 0
IGAIN "" 0
OGAIN "" 0
LINE1 "" 0
LINE2 "" 0
LINE3 "" 0
DIGITAL1 "" 0
DIGITAL2 "" 0
DIGITAL3 "" 0
PHONEIN "" 0
PHONEOUT "" 0
VIDEO "" 0
RADIO "" 0
MONITOR "" 0

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#5 lore raw
In reply to Clemens Ladisch
Quoted 1 line · Clemens Ladisch

(You can change mappings, see Documentation/OSS-Emulation.txt)

Manual reassignment works well, but I haven't yet been able to make automatic. :(

But at least I know the mixer code is fundamentally sound and I'll stick in my CVS

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642