Correct use of ak4114.c?

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

 



Hello,

while working on support for AK4114 in Audiotrak MI/ODI/O card, I used corresponding code from revo.c (and similarly from juli.c), calling function snd_ak4114_create. However, this function does not initialize array ak4114->kctls[idx], leading to consequent kernel oops after the periodically called snd_ak4114_check_rate_and_errors, specifically in function snd_ctl_notify called by snd_ctl_notify(ak4114->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4114->kctls[0]->id)

Temporarily I resolved the problem by commenting out the snd_ctl_notify calls. However, it seems author of ak4114.c intended to create the device with snd_ak4114_build instead which defines all the controls. I did not hit the problem until fixing the 4-wire communication in revo.c - that explaing why nobody had this problem with revo cards. I do not understand how the code can work in juli.c - perhaps I have overlooked something there.

My question: Is the correct way to add null pointer checks before  snd_ctl_notify calls only, or to use snd_ak4114_build insted of snd_ak4114_create? If using snd_ak4114_build, where do I get the parameters ply_substream and cap_substream?


int snd_ak4114_build(struct ak4114 *ak4114,
		     struct snd_pcm_substream *playback_substream,
                     struct snd_pcm_substream *capture_substream);

Thanks for any suggestions.

Pavel.
_______________________________________________
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