All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]alsa-driver-0.9.6/acore/hwdep.c
@ 2003-09-04 16:42 Karsten Wiese
  2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
  0 siblings, 1 reply; 6+ messages in thread
From: Karsten Wiese @ 2003-09-04 16:42 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel

Hi,

I'm trying the hwdep interface with poll().
looking for reasons why removal of USB-device caused bad MAGIC in hwdep.c,
I found this solution:

<PATCH>
--- alsa-driver-0.9.6/acore/hwdep.c     2003-07-30 01:01:23.000000000 +0200
+++ alsa-driver-0.9.6-patched/acore/hwdep.c     2003-09-04 17:45:59.000000000 
+0200
@@ -133,9 +133,14 @@
        set_current_state(TASK_RUNNING);
        remove_wait_queue(&hw->open_wait, &wait);
        if (err >= 0) {
+               err = snd_card_file_add(hw->card, file);
+               if (err < 0)
+                       return -ENODEV;
+
                file->private_data = hw;
                hw->used++;
        }
+
        up(&hw->open_mutex);
        return err;
 }
@@ -151,6 +156,7 @@
        }
        if (hw->used > 0)
                hw->used--;
+       snd_card_file_remove(hw->card, file);
        up(&hw->open_mutex);
        return -ENXIO;
 }
</PATCH>

Also in Web-CVS this part of the code seams not to have the snd_card_file* 
calls.
"It works for me" here. If it is correct, please apply!

regards,
Karsten



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-05 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-04 16:42 [PATCH]alsa-driver-0.9.6/acore/hwdep.c Karsten Wiese
2003-09-04 18:12 ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
2003-09-04 18:23   ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
2003-09-04 18:45     ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Jaroslav Kysela
2003-09-04 18:50       ` [PATCH]alsa-driver-0.9.6/acore/hwdep.c Takashi Iwai
2003-09-05 10:25   ` [PATCH]alsa\alsa-kernel\pci\ac97\ac97_codec.c Max Mozok

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.