[haiku-bugs] [Haiku] #5118: Haiku panics on HDA sound card

  • From: "flaggy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 13 Dec 2009 16:05:04 -0000

#5118: Haiku panics on HDA sound card
---------------------------+------------------------------------------------
 Reporter:  flaggy         |       Owner:  nobody        
     Type:  bug            |      Status:  new           
 Priority:  normal         |   Milestone:  Unscheduled   
Component:  Audio & Video  |     Version:  R1/Development
 Keywords:                 |   Blockedby:                
 Platform:  x86            |    Blocking:                
---------------------------+------------------------------------------------
 = Specification =

 I have a lenovo r61i laptop. The sound card is an intel hda, according to
 linux, the codec is Conexant CX20549 (Venice). The sound card works
 flawlessly on linux.

 Haiku revision: 34626 (compiled with gcc 4)

 = Error message =

 PANIC: vm_page_fault_unhandled page fault in kernel space at 0x0, ip
 0x800dd4db

 The backtrace is in the figure attached to this ticket.

 = Experimentation =

 I changed the code of the function `multi_audio_control` (src/add-
 ons/kernel/drivers/audio/hda/hda_multi_audio.cpp) to always return
 `B_ERROR` and the system was able to boot. Except for no sound, the system
 seemed to be working well.

 I thought the error could be in one of those `user_memcpy`, so I kept
 adding `return B_ERROR` further down the code. Eventually I removed the
 `return` from (line 1035)
 {{{
                         return user_memcpy(originalChannels, channels,
 sizeof(multi_channel_info)
                                         *
 description.request_channel_count);
 }}}
 and added {{{return B_ERROR}}} right after it. The system was able to
 boot. If I would change `B_ERROR` to `B_OK`, then the same kernel panic
 would come up again.

 I'm out of ideas of what could it be. It seems to be something wrong with
 `multi_audio_control` (or at least there's where things break badly), but
 at the same time, the error seems to happen only when the function
 returns. I may be missing something, being a C programmer with little
 experience in C++. Does C++ calls something on the function's data after
 the return?

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5118>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: