From 53c8faf4dc088ab4da0021750047e90023ce3284 Mon Sep 17 00:00:00 2001 From: Han Lu Date: Tue, 9 Jan 2018 20:24:47 +0800 Subject: q6asm: retry asm open in case of session id conflict The ADSP asm session ids are managed by the kernel driver. It's all right for native use cases. But for virtualization use cases, there's no way to synchronize the session ids' status among virtual machines. Playing back in one virtual machine is probably failed, because the session id may had been occupied by a use case in another virtual machine. The patch allowed audio playback stream to try all available session ids in case of session id conflict error, to support concurrent playback from multiple virtual machines. Change-Id: If98d05898cec3f05d80c750ec8a014add3b1f34c Signed-off-by: Han Lu --- include/sound/q6asm-v2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h index 9df3e77da05b..3523fac586ce 100644 --- a/include/sound/q6asm-v2.h +++ b/include/sound/q6asm-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -309,6 +309,10 @@ int q6asm_open_write_v4(struct audio_client *ac, uint32_t format, int q6asm_open_write_v5(struct audio_client *ac, uint32_t format, uint16_t bits_per_sample); + +int q6asm_open_write_with_retry(struct audio_client *ac, uint32_t format, + uint16_t bits_per_sample); + int q6asm_stream_open_write_v2(struct audio_client *ac, uint32_t format, uint16_t bits_per_sample, int32_t stream_id, bool is_gapless_mode); -- cgit v1.2.3