Update of /cvsroot/alsa/alsa-kernel/pci/emu10k1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv738/pci/emu10k1

Modified Files:
        emufx.c 
Log Message:
- fixed the oops in OSS mixer when the control elements are dynamically
  changed (e.g. emufx).
  mixer_oss.c handles the numid instead of kcontrol_t pointers.
- snd_ctl_find_id and snd_ctl_find_numid don't issue contros_rwsem.
  the caller has to handle it properly.


Index: emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- emufx.c     16 Jan 2004 18:08:49 -0000      1.47
+++ emufx.c     26 Jan 2004 11:48:40 -0000      1.48
@@ -913,8 +913,12 @@
                        return -EFAULT;
                if (snd_emu10k1_look_for_ctl(emu, &gctl.id))
                        continue;
-               if (snd_ctl_find_id(emu->card, &gctl.id) != NULL)
+               down_read(&emu->card->controls_rwsem);
+               if (snd_ctl_find_id(emu->card, &gctl.id) != NULL) {
+                       up_read(&emu->card->controls_rwsem);
                        return -EEXIST;
+               }
+               up_read(&emu->card->controls_rwsem);
                if (gctl.id.iface != SNDRV_CTL_ELEM_IFACE_MIXER &&
                    gctl.id.iface != SNDRV_CTL_ELEM_IFACE_PCM)
                        return -EINVAL;



-------------------------------------------------------
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-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to