hal: set stream channel map for noirq mode.
In noirq push pull mode channel map needs to be set during
ASM open shared io stream in driver. Parse stream channel map
before pcm open from hal to get the channel map info in the
driver during hw params call.
Change-Id: I9b3f8eae1aef2c1764586099a691801d53690b91
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index ad3a260..81085c0 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3074,6 +3074,10 @@
}
}
+ if (out->realtime)
+ platform_set_stream_channel_map(adev->platform, out->channel_mask,
+ out->pcm_device_id, &out->channel_map_param.channel_map[0]);
+
while (1) {
ATRACE_BEGIN("pcm_open");
out->pcm = pcm_open(adev->snd_card, out->pcm_device_id,
@@ -3094,7 +3098,8 @@
}
break;
}
- platform_set_stream_channel_map(adev->platform, out->channel_mask,
+ if (!out->realtime)
+ platform_set_stream_channel_map(adev->platform, out->channel_mask,
out->pcm_device_id, &out->channel_map_param.channel_map[0]);
ALOGV("%s: pcm_prepare", __func__);