linux-loongson/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h
Wesley Cheng 450d63471d ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp
The QC ADSP is able to support USB playback endpoints, so that the main
application processor can be placed into lower CPU power modes.  This adds
the required AFE port configurations and port start command to start an
audio session.

Specifically, the QC ADSP can support all potential endpoints that are
exposed by the audio data interface.  This includes isochronous data
endpoints, in either synchronous mode or asynchronous mode. In the latter
case both implicit or explicit feedback endpoints are supported.  The size
of audio samples sent per USB frame (microframe) will be adjusted based on
information received on the feedback endpoint.

Some pre-requisites are needed before issuing the AFE port start command,
such as setting the USB AFE dev_token.  This carries information about the
available USB SND cards and PCM devices that have been discovered on the
USB bus.  The dev_token field is used by the audio DSP to notify the USB
offload driver of which card and PCM index to enable playback on.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250409194804.3773260-23-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-11 13:02:32 +02:00

24 lines
822 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __Q6DSP_AUDIO_PORTS_H__
#define __Q6DSP_AUDIO_PORTS_H__
struct q6dsp_audio_port_dai_driver_config {
int (*probe)(struct snd_soc_dai *dai);
int (*remove)(struct snd_soc_dai *dai);
const struct snd_soc_dai_ops *q6hdmi_ops;
const struct snd_soc_dai_ops *q6slim_ops;
const struct snd_soc_dai_ops *q6i2s_ops;
const struct snd_soc_dai_ops *q6tdm_ops;
const struct snd_soc_dai_ops *q6dma_ops;
const struct snd_soc_dai_ops *q6usb_ops;
};
struct snd_soc_dai_driver *q6dsp_audio_ports_set_config(struct device *dev,
struct q6dsp_audio_port_dai_driver_config *cfg,
int *num_dais);
int q6dsp_audio_ports_of_xlate_dai_name(struct snd_soc_component *component,
const struct of_phandle_args *args,
const char **dai_name);
#endif /* __Q6DSP_AUDIO_PORTS_H__ */