Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 // Copyright (c) 2020 Intel Corporation
0003 
0004 /*
0005  *  sof_sdw_rt715_sdca - Helpers to handle RT715-SDCA from generic machine driver
0006  */
0007 
0008 #include <linux/device.h>
0009 #include <linux/errno.h>
0010 #include <sound/soc.h>
0011 #include <sound/soc-acpi.h>
0012 #include "sof_sdw_common.h"
0013 
0014 static int rt715_sdca_rtd_init(struct snd_soc_pcm_runtime *rtd)
0015 {
0016     struct snd_soc_card *card = rtd->card;
0017 
0018     card->components = devm_kasprintf(card->dev, GFP_KERNEL,
0019                       "%s mic:rt715-sdca",
0020                       card->components);
0021     if (!card->components)
0022         return -ENOMEM;
0023 
0024     return 0;
0025 }
0026 
0027 int sof_sdw_rt715_sdca_init(struct snd_soc_card *card,
0028                 const struct snd_soc_acpi_link_adr *link,
0029                 struct snd_soc_dai_link *dai_links,
0030                 struct sof_sdw_codec_info *info,
0031                 bool playback)
0032 {
0033     dai_links->init = rt715_sdca_rtd_init;
0034 
0035     return 0;
0036 }