This section in pcm.c returns error
if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_PREPARE) < 0) { return oops(pcm, errno, "cannot prepare channel"); }
It says invalid argument. I've tested with channel set to 1 and 2 but both of them returns this error. I don't know if the number of channels is incorrect or something else. Could anyone help me?