While you are looking at the oss emulation mixer, there is another bug there.At Wed, 21 Jan 2004 19:49:39 +0100 (CET), Jaroslav wrote:
On Wed, 21 Jan 2004, Takashi Iwai wrote:
At Wed, 21 Jan 2004 13:55:53 +0100, p z oooo wrote:
Hi,
When I remove control through hwdep layer on emu10k1 driver when in use by oss emulation I got oops. This is because oss emulation holds pointer to this control.
Is there any api to disable an then enable oss emulation or only proc interface ???
hmm weird, the access to ctl elements in mixer_oss.c is restricted with card->controls_rwsem. since snd_emu10k1_del_controls issues down_write() for it, it must be safe...
I think that he meant that slot->kcontrol members are not removed.
ah yes, i overlooked that.
We need probably rebuild the OSS mixer -> ALSA control connections when a control - which is used with the OSS mixer code - was removed.
or, store only the snd_ctl_elem_id instead of kcontrol, and retrieve the control at each time. since the access to the mixer element is less frequent than pcm, the overhead by this won't be too much, i think.
but rebuilding would be better, when the mixer elements are completely changed and become incompatible with the old setting.
we can use notify handler for this (e.g. SND_MIXER_OSS_NOTIFY_RECONFIGURE). (but the caller should be blocked until the notification is processed, otherwise there would be a race condition.)
Takashi
User application does VOL++. OSS has a range from 0-100 ALSA uses hardware range of 0-31. THus: - OSS VOL=0 OSS VOL++ ALSA VOL stays at 0 OSS READ VOL, = 0;
It seems like to emulate OSS correctly, one needs to hold volume values in the OSS mixer emulation code, instead of just passing them through to the ALSA mixer.
Cheers James
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel