Can not prepare channel: Invalid argument
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?
Did you set up the path of the playback before call the pcm_prepare? If the PCM device is a dynamic-path device, you need to setup path before prepare.
I don't know how I can find the requirement setups. I want to test it on Qualcomm chipsets. I would be thankful If you let me know any idea about finding the setups.
I want to test capture with tinycap.c. I've added tinyalsa files to my android app and wrote the following code:
frames = capture_sample(file, 0, 9, false,1, 48000, PCM_FORMAT_S16_LE, 1024, 4,3);
According to your comment I guess I should use tinymix before calling this line of code. But I don't know for record a .wav file on Qualcomm chipsets, How I can find the requirement tinymix configurations.