Skip to content
Snippets Groups Projects
Commit a75518e1 authored by Minecrell's avatar Minecrell
Browse files

Call pcm_prepare() to actually start audio with tinyalsa 2.0.0

https://github.com/tinyalsa/tinyalsa/commit/855354a87d2983e190088bc5330c129094b900ca
changed the pcm_open() call in tinyalsa to not automatically call pcm_prepare().
Now we need to do that explicitly in q6voiced to ensure that the audio streams
are actually being started. Otherwise q6voiced won't really do anything.
parent 67a5dd03
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,10 @@ static void q6voiced_open(struct q6voiced *v)
* This should be replaced by a codec2codec link probably.
*/
v->tx = pcm_open(v->card, v->device, PCM_IN, &pcm_config_voice_call);
if (!pcm_is_ready(v->tx))
perror("Failed to open tx");
v->rx = pcm_open(v->card, v->device, PCM_OUT, &pcm_config_voice_call);
if (!pcm_is_ready(v->rx))
if (!pcm_is_ready(v->tx) || pcm_prepare(v->tx))
perror("Failed to open tx");
if (!pcm_is_ready(v->rx) || pcm_prepare(v->rx))
perror("Failed to open rx");
printf("PCM devices were opened.\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment