[haiku-commits] r35289 - haiku/trunk/src/add-ons/kernel/drivers/audio/hda

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 25 Jan 2010 22:19:31 +0100 (CET)

Author: korli
Date: 2010-01-25 22:19:31 +0100 (Mon, 25 Jan 2010)
New Revision: 35289
Changeset: http://dev.haiku-os.org/changeset/35289/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
Log:
* spawn the thread after an audio group is created to be safe.


Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp      
2010-01-25 19:51:53 UTC (rev 35288)
+++ haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp      
2010-01-25 21:19:31 UTC (rev 35289)
@@ -1388,14 +1388,6 @@
        }
        codec->unsol_response_read = 0;
        codec->unsol_response_write = 0;
-       codec->unsol_response_thread = spawn_kernel_thread(
-               (status_t(*)(void*))hda_codec_switch_handler,
-               "hda_codec_unsol_thread", B_LOW_PRIORITY, codec);
-       if (codec->unsol_response_thread < B_OK) {
-               ERROR("hda: Failed to spawn thread\n");
-               goto err;
-       }
-       resume_thread(codec->unsol_response_thread);
 
        struct {
                uint32 device : 16;
@@ -1455,6 +1447,15 @@
                        }
                }
        }
+       
+       codec->unsol_response_thread = spawn_kernel_thread(
+               (status_t(*)(void*))hda_codec_switch_handler,
+               "hda_codec_unsol_thread", B_LOW_PRIORITY, codec);
+       if (codec->unsol_response_thread < B_OK) {
+               ERROR("hda: Failed to spawn thread\n");
+               goto err;
+       }
+       resume_thread(codec->unsol_response_thread);
 
        return codec;
 err:


Other related posts:

  • » [haiku-commits] r35289 - haiku/trunk/src/add-ons/kernel/drivers/audio/hda - korli