summaryrefslogtreecommitdiffstats
path: root/alsa-pcm.c
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-08 12:08:24 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:40 +1100
commitd996ba9ae3f5c589fe551c2349f03e10c59b5512 (patch)
tree1a31c3e490d1a2b287c99f303fb995de2a349aa8 /alsa-pcm.c
parent1b8e8c7a0b998e9e458094e5f1b7b60bc1c4b297 (diff)
Make Audio Path searching dynamic again
Remove hardcoded test Audio Path UID, and use dynamic Audio Path UID Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa-pcm.c')
-rw-r--r--alsa-pcm.c6
1 files 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