
On 3/10/25 16:55, Amadeusz Sławiński wrote:
On 3/10/2025 11:45 AM, Venkata Prasad Potturu wrote:
Implement acp common hardware ops for acp_init and acp_deinit funcions to support commons ops for all platforms.
Signed-off-by: Venkata Prasad Potturu venkataprasad.potturu@amd.com
sound/soc/amd/acp/acp-legacy-common.c | 50 +++++++++++++++++++++++++++ sound/soc/amd/acp/acp-pci.c | 13 ++++--- sound/soc/amd/acp/amd.h | 36 +++++++++++++++++++ 3 files changed, 95 insertions(+), 4 deletions(-)
...
@@ -252,6 +274,20 @@ int restore_acp_i2s_params(struct snd_pcm_substream *substream, void check_acp_config(struct pci_dev *pci, struct acp_chip_info *chip); +static inline int acp_hw_init(struct acp_chip_info *chip) +{ + if (chip && chip->acp_hw_ops && chip->acp_hw_ops->acp_init) + return chip->acp_hw_ops->acp_init(chip); + return -EOPNOTSUPP; +}
+static inline int acp_hw_deinit(struct acp_chip_info *chip) +{ + if (chip && chip->acp_hw_ops && chip->acp_hw_ops->acp_init)
Shouldn't it check for ->acp_deinit() instead?
Okay, I will correct it in version 2patch series.
+ return chip->acp_hw_ops->acp_deinit(chip); + return -EOPNOTSUPP; +}
static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int direction) { u64 byte_count = 0, low = 0, high = 0;