pcm->private_data is NULL in alsa core!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
I am writing an alsa driver for my omap based board. I am testing it using
cat /dev/audio currently, i.e. I have OSS emulation turned on. This is
an initial round of testing and I will use alsa-libs and utils later.

My problem is:

I have set the pcm->private_data = my_chip after registering the pcm ops,
after referring various standard drivers in alsa tree. My module is
insmoded properly but after I do snd_card_register(card) the
pcm->private_data is corrupted !! Before this step, the
pcm->private_data is intact.  But after looking at the
snd_card_register(), I realized that it doesn't even touch the pcm
pointer.

So, when I cat the device I get huge segfault in
snd_pcm_attach_substream(), since pcm->private_data is NULL but
surprisingly all the other fields are intact in pcm pointer.

 Even the OSS code doesn't touch the pcm pointer, what must be wrong?
I have checked my source atleast 5 times and couldn't find anything in it.

-pharaoh.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux