[alsa-devel] Correct use of ak4114.c?

dustin at seznam.cz dustin at seznam.cz
Mon Apr 2 11:52:45 CEST 2007

>  > Uff, that is a lot of background knowledge. Would it be possible to
>  > put this explanation into ice1724.c code? It would definitely help
>  > newcomers. Thanks a lot. 
>  A patch is welcome ;)

Sure, I will make one.
>  Then the problem is that it passed the playback substream to
>  snd_ak4114_build().  I guess passing NULL there instead should work.

Sounds like a perfectly simple solution. I am just wondering if the following code in ak4114.c is correct:

if (!strstr(kctl->id.name, "Playback")) {
	if (ply_substream == NULL) {
		ak4114->kctls[idx] = NULL;
	kctl->id.device = ply_substream->pcm->device;
	kctl->id.subdevice = ply_substream->number;
} else {
	kctl->id.device = cap_substream->pcm->device;
	kctl->id.subdevice = cap_substream->number;

If control name does NOT contain "Playback", playback stream is used. Should not be the check reversed? You are right, that code can handle the solution you propose.


More information about the Alsa-devel mailing list