Skip to content

audioreach-driver: Add changes to support RPMSG#49

Open
quic-annemari wants to merge 1 commit intoAudioReach:masterfrom
quic-annemari:master
Open

audioreach-driver: Add changes to support RPMSG#49
quic-annemari wants to merge 1 commit intoAudioReach:masterfrom
quic-annemari:master

Conversation

@quic-annemari
Copy link

Create q6apm_audio_pkt_rpmsg.c, which will use RPMSG as the IPC between the APPs processor and the DSP.

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>
@quic-annemari quic-annemari requested review from a team February 5, 2026 05:11
@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't actually need this function.

return apm->state;
}

bool q6apm_audio_is_adsp_ready(void)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to have this function.

#include <linux/wait.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/pcm.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need this header

#include <sound/soc-dapm.h>
#include <sound/pcm.h>
#include "audioreach.h"
#include "q6apm.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need this header

#include <sound/pcm.h>
#include "audioreach.h"
#include "q6apm.h"
#include "q6prm_audioreach.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this line?

};

module_rpmsg_driver(rpmsg_sample_client);
MODULE_DESCRIPTION("Audio Process Manager");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change to Audio Packet Driver

skb_queue_head_init(&apm->queue);
init_waitqueue_head(&apm->readq);

mutex_init(&apm->audpkt_port_lock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems, not getting used.

uint32_t state;


struct cdev cdev;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

@quic-aditrath quic-aditrath Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add q6apm_audio_pkt.o object file as well for qcom vendor condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants