Add tdm support in acp machine driver
Subsystems (3)
Venkata Prasad Potturu
reviewercover Add tdm support in acp machine driver
This patch set is to add new cpu dai, refactor dai format implementation and add tdm support in acp machine driver.
Venkata Prasad Potturu (5):
ASoC: amd: acp: Refactor i2s bclk calculation
ASoC: amd: acp: Add new cpu dai's in machine driver
ASoC: amd: acp: Refactor dai format implementation
ASoC: amd: acp: Add tdm support in machine driver
ASoC: amd: acp: Enable tdm support for skyrim platforms
sound/soc/amd/acp/acp-legacy-mach.c | 13 ++ sound/soc/amd/acp/acp-mach-common.c | 275 +++++++++++++++++++++++----- sound/soc/amd/acp/acp-mach.h | 4 + sound/soc/amd/acp/acp-sof-mach.c | 14 ++ 4 files changed, 256 insertions(+), 50 deletions(-)
Signature · 1 line
2.25.1
Venkata Prasad Potturu
reviewerPATCH 1/5 ASoC: amd: acp: Refactor i2s bclk calculation
Refactor i2s bclk value based on hw_params.
--- sound/soc/amd/acp/acp-mach-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/amd/acp/acp-mach-common.c +4 -1
@@ -352,8 +352,11 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai;int srate, i, ret =0 ; +unsigned int ch, format; srate =params_rate (params); + ch =params_channels (params); + format =8 *params_format (params);if (drvdata->amp_codec_id !=RT1019 )return -EINVAL ;
@@ -363,7 +366,7 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,continue ; ret =snd_soc_dai_set_pll (codec_dai,0 ,RT1019_PLL_S_BCLK , -64 * srate,256 * srate); + ch * format * srate,256 * srate);if (ret <0 )return ret;
Signature · 1 line
2.25.1
Venkata Prasad Potturu
reviewerPATCH 2/5 ASoC: amd: acp: Add new cpu dai's in machine driver
In reply to Venkata Prasad PotturuWhile using same cpu dai for 2 different dai links below error is reported.
error: can't find BE for DAI ACPHS_VIRTUAL1.OUT
To avoid this error add new cpu dai.
--- sound/soc/amd/acp/acp-mach-common.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
sound/soc/amd/acp/acp-mach-common.c +8 -4
@@ -568,8 +568,12 @@ SND_SOC_DAILINK_DEF(i2s_hs, DAILINK_COMP_ARRAY(COMP_CPU("acp-i2s-hs")));SND_SOC_DAILINK_DEF (sof_sp,DAILINK_COMP_ARRAY (COMP_CPU ("acp-sof-sp" ))); +SND_SOC_DAILINK_DEF (sof_sp_virtual, +DAILINK_COMP_ARRAY (COMP_CPU ("acp-sof-sp-virtual" )));SND_SOC_DAILINK_DEF (sof_hs,DAILINK_COMP_ARRAY (COMP_CPU ("acp-sof-hs" ))); +SND_SOC_DAILINK_DEF (sof_hs_virtual, +DAILINK_COMP_ARRAY (COMP_CPU ("acp-sof-hs-virtual" )));SND_SOC_DAILINK_DEF (sof_dmic,DAILINK_COMP_ARRAY (COMP_CPU ("acp-sof-dmic" ))); SND_SOC_DAILINK_DEF(pdm_dmic,
@@ -704,8 +708,8 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card)if (drv_data->amp_cpu_id ==I2S_SP ) { links[i].name ="acp-amp-codec" ; links[i].id =AMP_BE_ID ; - links[i].cpus = sof_sp; - links[i].num_cpus =ARRAY_SIZE (sof_sp); + links[i].cpus = sof_sp_virtual; + links[i].num_cpus =ARRAY_SIZE (sof_sp_virtual); links[i].platforms = sof_component; links[i].num_platforms =ARRAY_SIZE (sof_component); links[i].dpcm_playback =1 ;
@@ -736,8 +740,8 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card)if (drv_data->amp_cpu_id ==I2S_HS ) { links[i].name ="acp-amp-codec" ; links[i].id =AMP_BE_ID ; - links[i].cpus = sof_hs; - links[i].num_cpus =ARRAY_SIZE (sof_hs); + links[i].cpus = sof_hs_virtual; + links[i].num_cpus =ARRAY_SIZE (sof_hs_virtual); links[i].platforms = sof_component; links[i].num_platforms =ARRAY_SIZE (sof_component); links[i].dpcm_playback =1 ;
Signature · 1 line
2.25.1
Venkata Prasad Potturu
reviewerPATCH 3/5 ASoC: amd: acp: Refactor dai format implementation
In reply to Venkata Prasad PotturuRefactor dai format implementation in dai_link specific snd_soc_ops.
--- sound/soc/amd/acp/acp-mach-common.c | 134 +++++++++++++++++++--------- 1 file changed, 90 insertions(+), 44 deletions(-)
sound/soc/amd/acp/acp-mach-common.c +90 -44
@@ -86,13 +86,6 @@ static int acp_card_rt5682_init(struct snd_soc_pcm_runtime *rtd)if (drvdata->hs_codec_id !=RT5682 )return -EINVAL ; - ret =snd_soc_dai_set_fmt (codec_dai,SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF - |SND_SOC_DAIFMT_CBP_CFP ); -if (ret <0 ) { -dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); -return ret; - } - ret =snd_soc_dai_set_pll (codec_dai,RT5682_PLL2 ,RT5682_PLL2_S_MCLK ,PCO_PLAT_CLK ,RT5682_PLL_FREQ );if (ret <0 ) {
@@ -148,19 +141,7 @@ static int acp_card_hs_startup(struct snd_pcm_substream *substream)struct snd_soc_card *card = rtd->card;struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 ); -int ret; -unsigned int fmt; - -if (drvdata->soc_mclk) - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; -else - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; - - ret =snd_soc_dai_set_fmt (codec_dai, fmt); -if (ret <0 ) { -dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); -return ret; - } +int ret =0 ; runtime->hw.channels_max =DUAL_CHANNEL ; snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
@@ -191,9 +172,41 @@ static void acp_card_shutdown(struct snd_pcm_substream *substream)clk_disable_unprepare (drvdata->wclk); } +static int acp_card_rt5682x_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params) +{ +struct snd_soc_pcm_runtime *rtd = substream->private_data; +struct snd_soc_card *card = rtd->card; +struct acp_card_drvdata *drvdata = card->drvdata; +struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 ); +struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 ); +int ret; +unsigned int fmt; + +if (drvdata->soc_mclk) + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; +else + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; + + ret =snd_soc_dai_set_fmt (cpu_dai, fmt); +if (ret && ret != -ENOTSUPP ) { +dev_err (rtd->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } + + ret =snd_soc_dai_set_fmt (codec_dai, fmt); +if (ret <0 ) { +dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } + +return 0 ; +} +static const struct snd_soc_ops acp_card_rt5682_ops = { .startup = acp_card_hs_startup, .shutdown = acp_card_shutdown, + .hw_params = acp_card_rt5682x_hw_params, };/* Define RT5682S CODEC component*/
@@ -212,7 +225,6 @@ static int acp_card_rt5682s_init(struct snd_soc_pcm_runtime *rtd)struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 );struct snd_soc_component *component = codec_dai->component; -unsigned int fmt;int ret;dev_info (rtd->dev,"codec dai name = %s\n" , codec_dai->name);
@@ -220,17 +232,6 @@ static int acp_card_rt5682s_init(struct snd_soc_pcm_runtime *rtd)if (drvdata->hs_codec_id !=RT5682S )return -EINVAL ; -if (drvdata->soc_mclk) - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; -else - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; - - ret =snd_soc_dai_set_fmt (codec_dai, fmt); -if (ret <0 ) { -dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); -return ret; - } - ret =snd_soc_dai_set_pll (codec_dai,RT5682S_PLL2 ,RT5682S_PLL_S_MCLK ,PCO_PLAT_CLK ,RT5682_PLL_FREQ );if (ret <0 ) {
@@ -283,6 +284,7 @@ static int acp_card_rt5682s_init(struct snd_soc_pcm_runtime *rtd)static const struct snd_soc_ops acp_card_rt5682s_ops = { .startup = acp_card_hs_startup, + .hw_params = acp_card_rt5682x_hw_params, };static const unsigned int dmic_channels[] = {
@@ -351,8 +353,9 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,struct snd_soc_card *card = rtd->card;struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai; +struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 );int srate, i, ret =0 ; -unsigned int ch, format; +unsigned int ch, format, fmt; srate =params_rate (params); ch =params_channels (params);
@@ -361,6 +364,17 @@ static int acp_card_rt1019_hw_params(struct snd_pcm_substream *substream,if (drvdata->amp_codec_id !=RT1019 )return -EINVAL ; +if (drvdata->soc_mclk) + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; +else + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; + + ret =snd_soc_dai_set_fmt (cpu_dai, fmt); +if (ret && ret != -ENOTSUPP ) { +dev_err (rtd->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } +for_each_rtd_codec_dais (rtd, i, codec_dai) {if (strcmp (codec_dai->name,"rt1019-aif" ))continue ;
@@ -429,9 +443,31 @@ static int acp_card_maxim_init(struct snd_soc_pcm_runtime *rtd) ARRAY_SIZE(max98360a_map)); } +static int acp_card_maxim_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params) +{ +struct snd_soc_pcm_runtime *rtd = substream->private_data; +struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 ); +unsigned int fmt; +int ret; + +if (drvdata->soc_mclk) + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; +else + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; + + ret =snd_soc_dai_set_fmt (cpu_dai, fmt); +if (ret && ret != -ENOTSUPP ) { +dev_err (rtd->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } +return 0 ; +} +static const struct snd_soc_ops acp_card_maxim_ops = { .startup = acp_card_amp_startup, .shutdown = acp_card_shutdown, + .hw_params = acp_card_maxim_hw_params, };/* Declare nau8825 codec components */
@@ -449,7 +485,6 @@ static int acp_card_nau8825_init(struct snd_soc_pcm_runtime *rtd)struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 );struct snd_soc_component *component = codec_dai->component; -unsigned int fmt;int ret;dev_info (rtd->dev,"codec dai name = %s\n" , codec_dai->name);
@@ -457,16 +492,6 @@ static int acp_card_nau8825_init(struct snd_soc_pcm_runtime *rtd)if (drvdata->hs_codec_id !=NAU8825 )return -EINVAL ; -if (drvdata->soc_mclk) - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; -else - fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; - - ret =snd_soc_dai_set_fmt (codec_dai, fmt); -if (ret <0 ) { -dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); -return ret; - } ret = snd_soc_card_jack_new(card, "Headset Jack", SND_JACK_HEADSET | SND_JACK_LINEOUT | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
@@ -495,8 +520,12 @@ static int acp_nau8825_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) {struct snd_soc_pcm_runtime *rtd =asoc_substream_to_rtd (substream); +struct snd_soc_card *card = rtd->card; +struct acp_card_drvdata *drvdata = card->drvdata;struct snd_soc_dai *codec_dai =asoc_rtd_to_codec (rtd,0 ); +struct snd_soc_dai *cpu_dai =asoc_rtd_to_cpu (rtd,0 );int ret; +unsigned int fmt; ret =snd_soc_dai_set_sysclk (codec_dai,NAU8825_CLK_FLL_FS , (48000 *256 ),SND_SOC_CLOCK_IN );
@@ -510,6 +539,23 @@ static int acp_nau8825_hw_params(struct snd_pcm_substream *substream,return ret; } +if (drvdata->soc_mclk) + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBC_CFC ; +else + fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBP_CFP ; + + ret =snd_soc_dai_set_fmt (cpu_dai, fmt); +if (ret && ret != -ENOTSUPP ) { +dev_err (rtd->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } + + ret =snd_soc_dai_set_fmt (codec_dai, fmt); +if (ret <0 ) { +dev_err (rtd->card->dev,"Failed to set dai fmt: %d\n" , ret); +return ret; + } +return ret; }
Signature · 1 line
2.25.1
Mark Brown
maintainerRe: [PATCH 3/5] ASoC: amd: acp: Refactor dai format implementation
Quoted 2 lines · Venkata Prasad Potturu
Refactor dai format implementation in
dai_linkspecificsnd_soc_ops.
This breaks an x86 allmodconfig build:
/build/stage/linux/sound/soc/amd/acp/acp-mach-common.c: In function ‘acp_card_maxim_hw_params’:
/build/stage/linux/sound/soc/amd/acp/acp-mach-common.c:454:13: error: ‘drvdata’ undeclared (first use in this function)
454 | if (drvdata->soc_mclk)
| ^~~~~~~
/build/stage/linux/sound/soc/amd/acp/acp-mach-common.c:454:13: note: each undeclared identifier is reported only once for each function it appears in
Venkata Prasad Potturu
reviewerPATCH 4/5 ASoC: amd: acp: Add tdm support in machine driver
In reply to Venkata Prasad PotturuAdd tdm support for amd platforms.
--- sound/soc/amd/acp/acp-legacy-mach.c | 5 ++ sound/soc/amd/acp/acp-mach-common.c | 130 +++++++++++++++++++++++++--- sound/soc/amd/acp/acp-mach.h | 3 + sound/soc/amd/acp/acp-sof-mach.c | 6 ++ 4 files changed, 133 insertions(+), 11 deletions(-)
sound/soc/amd/acp/acp-legacy-mach.c +5 -0
@@ -27,6 +27,7 @@ static struct acp_card_drvdata rt5682_rt1019_data = { .hs_codec_id = RT5682, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata rt5682s_max_data = {
@@ -36,6 +37,7 @@ static struct acp_card_drvdata rt5682s_max_data = { .hs_codec_id = RT5682S, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata rt5682s_rt1019_data = {
@@ -45,6 +47,7 @@ static struct acp_card_drvdata rt5682s_rt1019_data = { .hs_codec_id = RT5682S, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata max_nau8825_data = {
@@ -56,6 +59,7 @@ static struct acp_card_drvdata max_nau8825_data = { .dmic_codec_id = DMIC, .soc_mclk = true, .platform = REMBRANDT, + .tdm_mode = false, };static struct acp_card_drvdata rt5682s_rt1019_rmb_data = {
@@ -67,6 +71,7 @@ static struct acp_card_drvdata rt5682s_rt1019_rmb_data = { .dmic_codec_id = DMIC, .soc_mclk = true, .platform = REMBRANDT, + .tdm_mode = false, };static const struct snd_kcontrol_new acp_controls[] = {
sound/soc/amd/acp/acp-mach-common.c +119 -11
200 lines not on this page · raw message
sound/soc/amd/acp/acp-mach.h +3 -0
@@ -18,6 +18,8 @@#include <linux/module.h> #include <sound/soc.h> +#define TDM_CHANNELS 8 +enum be_id {HEADSET_BE_ID =0 ,AMP_BE_ID ,
@@ -58,6 +60,7 @@ struct acp_card_drvdata {struct clk *wclk;struct clk *bclk;bool soc_mclk; +bool tdm_mode; };int acp_sofdsp_dai_links_create (struct snd_soc_card *card);
sound/soc/amd/acp/acp-sof-mach.c +6 -0
@@ -27,6 +27,7 @@ static struct acp_card_drvdata sof_rt5682_rt1019_data = { .hs_codec_id = RT5682, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata sof_rt5682_max_data = {
@@ -36,6 +37,7 @@ static struct acp_card_drvdata sof_rt5682_max_data = { .hs_codec_id = RT5682, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata sof_rt5682s_rt1019_data = {
@@ -45,6 +47,7 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = { .hs_codec_id = RT5682S, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata sof_rt5682s_max_data = {
@@ -54,6 +57,7 @@ static struct acp_card_drvdata sof_rt5682s_max_data = { .hs_codec_id = RT5682S, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, + .tdm_mode = false, };static struct acp_card_drvdata sof_nau8825_data = {
@@ -64,6 +68,7 @@ static struct acp_card_drvdata sof_nau8825_data = { .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, .soc_mclk = true, + .tdm_mode = false, };static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = {
@@ -74,6 +79,7 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { .amp_codec_id = RT1019, .dmic_codec_id = DMIC, .soc_mclk = true, + .tdm_mode = false, };static const struct snd_kcontrol_new acp_controls[] = {
Signature · 1 line
2.25.1
Venkata Prasad Potturu
reviewerPATCH 5/5 ASoC: amd: acp: Enable tdm support for skyrim platforms
In reply to Venkata Prasad PotturuEnable tdm support for skyrim platform using dmi quirks.
--- sound/soc/amd/acp/acp-legacy-mach.c | 8 ++++++++ sound/soc/amd/acp/acp-mach-common.c | 14 ++++++++++++++ sound/soc/amd/acp/acp-mach.h | 1 + sound/soc/amd/acp/acp-sof-mach.c | 8 ++++++++ 4 files changed, 31 insertions(+)
sound/soc/amd/acp/acp-legacy-mach.c +8 -0
@@ -16,6 +16,7 @@#include <sound/pcm_params.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> +#include <linux/dmi.h> #include <linux/module.h> #include "acp-mach.h"
@@ -95,6 +96,8 @@ static int acp_asoc_probe(struct platform_device *pdev) {struct snd_soc_card *card =NULL ;struct device *dev = &pdev->dev; +const struct dmi_system_id *dmi_id; +struct acp_card_drvdata *acp_drvdata;int ret;if (!pdev->id_entry)
@@ -113,6 +116,11 @@ static int acp_asoc_probe(struct platform_device *pdev) card->num_controls =ARRAY_SIZE (acp_controls); card->drvdata = (struct acp_card_drvdata *)pdev->id_entry->driver_data; + acp_drvdata = card->drvdata; + dmi_id =dmi_first_match (acp_quirk_table); +if (dmi_id && dmi_id->driver_data) + acp_drvdata->tdm_mode = dmi_id->driver_data; +acp_legacy_dai_links_create (card); ret =devm_snd_soc_register_card (&pdev->dev, card);
sound/soc/amd/acp/acp-mach-common.c +14 -0
@@ -32,6 +32,20 @@#define DUAL_CHANNEL 2#define FOUR_CHANNEL 4 +#define TDM_MODE_ENABLE 1 + +const struct dmi_system_id acp_quirk_table[] = { + { +/* Google skyrim proto-0 */ + .matches = { +DMI_EXACT_MATCH (DMI_PRODUCT_FAMILY ,"Google_Skyrim" ), + }, + .driver_data = (void *)TDM_MODE_ENABLE , + }, + {} +}; +EXPORT_SYMBOL_GPL (acp_quirk_table); +static struct snd_soc_jack pco_jack;static const unsigned int channels[] = {
sound/soc/amd/acp/acp-mach.h +1 -0
@@ -65,5 +65,6 @@ struct acp_card_drvdata {int acp_sofdsp_dai_links_create (struct snd_soc_card *card);int acp_legacy_dai_links_create (struct snd_soc_card *card); +extern const struct dmi_system_id acp_quirk_table[];#endif
sound/soc/amd/acp/acp-sof-mach.c +8 -0
@@ -16,6 +16,7 @@#include <sound/pcm_params.h> #include <sound/soc-acpi.h> #include <sound/soc-dapm.h> +#include <linux/dmi.h> #include <linux/module.h> #include "acp-mach.h"
@@ -102,6 +103,8 @@ static int acp_sof_probe(struct platform_device *pdev) {struct snd_soc_card *card =NULL ;struct device *dev = &pdev->dev; +const struct dmi_system_id *dmi_id; +struct acp_card_drvdata *acp_drvdata;int ret;if (!pdev->id_entry)
@@ -120,6 +123,11 @@ static int acp_sof_probe(struct platform_device *pdev) card->num_controls =ARRAY_SIZE (acp_controls); card->drvdata = (struct acp_card_drvdata *)pdev->id_entry->driver_data; + acp_drvdata = card->drvdata; + dmi_id =dmi_first_match (acp_quirk_table); +if (dmi_id && dmi_id->driver_data) + acp_drvdata->tdm_mode = dmi_id->driver_data; +acp_sofdsp_dai_links_create (card); ret =devm_snd_soc_register_card (&pdev->dev, card);
Signature · 1 line
2.25.1
Mark Brown
maintainerQuoted 11 lines · Venkata Prasad Potturu
This patch set is to add new cpu dai, refactor dai format implementation and add tdm support in acp machine driver.
Venkata Prasad Potturu (5):
ASoC: amd: acp: Refactor i2s bclk calculation
ASoC: amd: acp: Add new cpu dai's in machine driver
ASoC: amd: acp: Refactor dai format implementation
ASoC: amd: acp: Add tdm support in machine driver
ASoC: amd: acp: Enable tdm support for skyrim platforms[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: amd: acp: Refactor i2s bclk calculation
(no commit info)
[2/5] ASoC: amd: acp: Add new cpu dai's in machine driver
commit: 099b923fc15d8faa91c5fc1b46cbc483d034f5dc
[3/5] ASoC: amd: acp: Refactor dai format implementation
commit: af830fc44a2d273b163e76b17f51b128ce694481[4/5] ASoC: amd: acp: Add tdm support in machine driver
(no commit info)
[5/5] ASoC: amd: acp: Enable tdm support for skyrim platforms
(no commit info)
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark