mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

If both playback and capture streams have large buffer size in low power audio case, the total size will exceed the maximum buffer size for this sound card. Capture stream doesn't need so large buffer size in fact. So calculate a reasonable smaller buffer size and allocate it for capture stream. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright 2017-2021 NXP
|
|
*/
|
|
|
|
#ifndef __FSL_RPMSG_H
|
|
#define __FSL_RPMSG_H
|
|
|
|
/*
|
|
* struct fsl_rpmsg_soc_data
|
|
* @rates: supported rates
|
|
* @formats: supported formats
|
|
*/
|
|
struct fsl_rpmsg_soc_data {
|
|
int rates;
|
|
u64 formats;
|
|
};
|
|
|
|
/*
|
|
* struct fsl_rpmsg - rpmsg private data
|
|
*
|
|
* @ipg: ipg clock for cpu dai (SAI)
|
|
* @mclk: master clock for cpu dai (SAI)
|
|
* @dma: clock for dma device
|
|
* @pll8k: parent clock for multiple of 8kHz frequency
|
|
* @pll11k: parent clock for multiple of 11kHz frequency
|
|
* @card_pdev: Platform_device pointer to register a sound card
|
|
* @soc_data: soc specific data
|
|
* @mclk_streams: Active streams that are using baudclk
|
|
* @force_lpa: force enable low power audio routine if condition satisfy
|
|
* @enable_lpa: enable low power audio routine according to dts setting
|
|
* @buffer_size: pre allocated dma buffer size
|
|
*/
|
|
struct fsl_rpmsg {
|
|
struct clk *ipg;
|
|
struct clk *mclk;
|
|
struct clk *dma;
|
|
struct clk *pll8k;
|
|
struct clk *pll11k;
|
|
struct platform_device *card_pdev;
|
|
const struct fsl_rpmsg_soc_data *soc_data;
|
|
unsigned int mclk_streams;
|
|
int force_lpa;
|
|
int enable_lpa;
|
|
int buffer_size[2];
|
|
};
|
|
#endif /* __FSL_RPMSG_H */
|