Commit 6605f0ca authored by Sathyanarayana Nujella's avatar Sathyanarayana Nujella Committed by Mark Brown

ASoC: intel: sof_rt5682: Add support for tgl-max98357a-rt5682

This patch adds the driver data and updates quirk info
for tgl with max98357a speaker amp and ALC5682 headset codec.
Signed-off-by: default avatarSathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: default avatarJairaj Arava <jairaj.arava@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191126143205.21987-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c68e0797
...@@ -598,6 +598,9 @@ static int sof_audio_probe(struct platform_device *pdev) ...@@ -598,6 +598,9 @@ static int sof_audio_probe(struct platform_device *pdev)
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
if (pdev->id_entry && pdev->id_entry->driver_data)
sof_rt5682_quirk = (unsigned long)pdev->id_entry->driver_data;
dmi_check_system(sof_rt5682_quirk_table); dmi_check_system(sof_rt5682_quirk_table);
if (soc_intel_is_byt() || soc_intel_is_cht()) { if (soc_intel_is_byt() || soc_intel_is_cht()) {
...@@ -691,6 +694,21 @@ static int sof_rt5682_remove(struct platform_device *pdev) ...@@ -691,6 +694,21 @@ static int sof_rt5682_remove(struct platform_device *pdev)
return 0; return 0;
} }
static const struct platform_device_id board_ids[] = {
{
.name = "sof_rt5682",
},
{
.name = "tgl_max98357a_rt5682",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
SOF_RT5682_SSP_CODEC(0) |
SOF_SPEAKER_AMP_PRESENT |
SOF_RT5682_SSP_AMP(1) |
SOF_RT5682_NUM_HDMIDEV(4)),
},
{ }
};
static struct platform_driver sof_audio = { static struct platform_driver sof_audio = {
.probe = sof_audio_probe, .probe = sof_audio_probe,
.remove = sof_rt5682_remove, .remove = sof_rt5682_remove,
...@@ -698,6 +716,7 @@ static struct platform_driver sof_audio = { ...@@ -698,6 +716,7 @@ static struct platform_driver sof_audio = {
.name = "sof_rt5682", .name = "sof_rt5682",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
}, },
.id_table = board_ids,
}; };
module_platform_driver(sof_audio) module_platform_driver(sof_audio)
...@@ -707,3 +726,4 @@ MODULE_AUTHOR("Bard Liao <bard.liao@intel.com>"); ...@@ -707,3 +726,4 @@ MODULE_AUTHOR("Bard Liao <bard.liao@intel.com>");
MODULE_AUTHOR("Sathya Prakash M R <sathya.prakash.m.r@intel.com>"); MODULE_AUTHOR("Sathya Prakash M R <sathya.prakash.m.r@intel.com>");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:sof_rt5682"); MODULE_ALIAS("platform:sof_rt5682");
MODULE_ALIAS("platform:tgl_max98357a_rt5682");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment