audioreach-driver: Add changes to support RPMSG#49
audioreach-driver: Add changes to support RPMSG#49quic-annemari wants to merge 1 commit intoAudioReach:masterfrom
Conversation
Create q6apm_audio_pkt_rpmsg.c, which will use RPMSG as the IPC between the APPs processor and the DSP. Signed-off-by: Annemarie Porter <annemari@qti.qualcomm.com>
| @@ -0,0 +1,657 @@ | |||
| // SPDX-License-Identifier: GPL-2.0 | |||
| // Copyright (c) 2020, Linaro Limited | |||
| // Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved. | |||
There was a problem hiding this comment.
I think we should check and use new copyright header
| #endif | ||
|
|
||
| static struct rpmsg_device_id rpmsg_driver_sample_id_table[] = { | ||
| { .name = "rpmsg-client-sample" }, |
There was a problem hiding this comment.
Let's do clean up. This is no longer sample code.
| }; | ||
| MODULE_DEVICE_TABLE(rpmsg, rpmsg_driver_sample_id_table); | ||
|
|
||
| static struct rpmsg_driver rpmsg_sample_client = { |
There was a problem hiding this comment.
Let's do clean up. This is no longer sample code
| APM_MODULE_INSTANCE_ID, true); | ||
| } | ||
|
|
||
| static int q6apm_audio_get_apm_state(struct q6apm_audio_pkt *apm) |
There was a problem hiding this comment.
You don't actually need this function.
| return apm->state; | ||
| } | ||
|
|
||
| bool q6apm_audio_is_adsp_ready(void) |
There was a problem hiding this comment.
No need to have this function.
| #include <linux/wait.h> | ||
| #include <sound/soc.h> | ||
| #include <sound/soc-dapm.h> | ||
| #include <sound/pcm.h> |
There was a problem hiding this comment.
Don't think we need this header
| #include <sound/soc-dapm.h> | ||
| #include <sound/pcm.h> | ||
| #include "audioreach.h" | ||
| #include "q6apm.h" |
There was a problem hiding this comment.
Don't think we need this header
| #include <sound/pcm.h> | ||
| #include "audioreach.h" | ||
| #include "q6apm.h" | ||
| #include "q6prm_audioreach.h" |
There was a problem hiding this comment.
Don't think we need this header
| module_rpmsg_driver(rpmsg_sample_client); | ||
| MODULE_DESCRIPTION("Audio Process Manager"); | ||
| MODULE_LICENSE("GPL"); | ||
| MODULE_IMPORT_NS("DMA_BUF"); |
There was a problem hiding this comment.
Do we really need this line?
| }; | ||
|
|
||
| module_rpmsg_driver(rpmsg_sample_client); | ||
| MODULE_DESCRIPTION("Audio Process Manager"); |
There was a problem hiding this comment.
Let's change to Audio Packet Driver
| skb_queue_head_init(&apm->queue); | ||
| init_waitqueue_head(&apm->readq); | ||
|
|
||
| mutex_init(&apm->audpkt_port_lock); |
There was a problem hiding this comment.
Is this needed? we are initializing this mutex, but is not used.
| init_waitqueue_head(&apm->readq); | ||
|
|
||
| mutex_init(&apm->audpkt_port_lock); | ||
| idr_init(&apm->audpkt_port_idr); |
There was a problem hiding this comment.
seems, not getting used.
| uint32_t state; | ||
|
|
||
|
|
||
| struct cdev cdev; |
There was a problem hiding this comment.
Please check for alignment.
| audioreach_driver-objs += q6apm_lpass_dummy_dais.o | ||
| audioreach_driver-objs += q6prm_audioreach_clock.o | ||
| audioreach_driver-objs += q6prm_audioreach.o | ||
| audioreach_driver-objs += audioreach_common.o |
There was a problem hiding this comment.
Add q6apm_audio_pkt.o object file as well for qcom vendor condition.
Create q6apm_audio_pkt_rpmsg.c, which will use RPMSG as the IPC between the APPs processor and the DSP.