From d996ba9ae3f5c589fe551c2349f03e10c59b5512 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Mon, 8 Oct 2018 12:08:24 +1100 Subject: Make Audio Path searching dynamic again Remove hardcoded test Audio Path UID, and use dynamic Audio Path UID Signed-off-by: Mark Farrugia --- alsa-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alsa-pcm.c b/alsa-pcm.c index efa0a15..dbb1275 100644 --- a/alsa-pcm.c +++ b/alsa-pcm.c @@ -56,10 +56,10 @@ static int pcm_open(struct snd_pcm_substream *substream) struct snd_pcm_hardware *hw; unsigned int chans = 0; - char *uid = "ap_fddsp"; // TD MF: Make this dynamic! - audiopath = avirt_audiopath_get(uid); + stream = __avirt_stream_find_by_device(substream->pcm->device); + audiopath = avirt_audiopath_get(stream->map); CHK_NULL_V(audiopath, -EFAULT, "Cannot find Audio Path uid: '%s'!", - uid); + stream->map); substream->private_data = audiopath; // Copy the hw params from the audiopath to the pcm -- cgit