diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-08 12:08:24 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-26 17:27:40 +1100 |
commit | d996ba9ae3f5c589fe551c2349f03e10c59b5512 (patch) | |
tree | 1a31c3e490d1a2b287c99f303fb995de2a349aa8 | |
parent | 1b8e8c7a0b998e9e458094e5f1b7b60bc1c4b297 (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>
-rw-r--r-- | alsa-pcm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |