Commit graph

2919 commits

Author SHA1 Message Date
Mac Chiang
b20c81371a
ASoC: Intel: sof_rt5682: Add mtl support RT1019P speaker
This patch support below hardware configuration:

SSP2: 10EC5682/RTL5682 codec
SSP0: RTL1019 amplifier

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230616063617.25900-2-mac.chiang@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21 13:42:48 +01:00
Terry Cheong
1f583cbdc3
ASoC: Intel: sof_rt5682: reorder quirk table
Reorder the entries in quirk table to group entries with same platform.

Signed-off-by: Terry Cheong <htcheong@chromium.org>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Link: https://lore.kernel.org/r/20230616063617.25900-1-mac.chiang@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21 13:42:47 +01:00
Mark Brown
1afc383a17
ASoC: Merge up fixes for CI
Some of the fixes merged should be relevant for my CI stability.
2023-06-21 01:32:48 +01:00
Charles Keepax
1f1ef7e5bb
ASoC: intel: sof_sdw: Fixup typo in device link checking
The loop checking for multiple different devices on a single sdw link
contains a typo accidentally using i twice instead of j. Correct to the
correct index variable.

Fixes: dc5a3e60a4 ("ASoC: Intel: sof_sdw: append codec type to dai link name")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230614142116.1059677-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:22 +01:00
Mark Brown
1a32b4b9a6
ASoC: Merge fixes due to dependencies
So we can apply the tlv320aic3xxx DT conversion.
2023-06-16 14:55:20 +01:00
Bard Liao
0281b02e19
ASoC: Intel: sof_sdw: add dai_link_codec_ch_map
The captured data will be combined from each cpu DAI if the dai link
has more than one cpu DAIs. We can set channel number indirectly by
adding sdw_codec_ch_maps.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20230607031242.1032060-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-13 12:11:16 +01:00
Brent Lu
51bdf6ebe5
ASoC: Intel: avs-ssm4567: remove redundant dapm routes
Four routes "Left Playback<-sspX Tx", "Right Playback<-sspX Tx",
"sspX Rx<-Left Capture Sense", and "sspX Rx<-Right Capture Sense" are
created by snd_soc_dapm_connect_dai_link_widgets() automatically.
Remove the duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-13-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:37 +01:00
Brent Lu
96b5452fe4
ASoC: Intel: avs-rt5682: remove redundant dapm routes
Two routes "AIF1 Playback<-sspX Tx" and "sspX Rx<-AIF1 Capture" are
created by snd_soc_dapm_connect_dai_link_widgets() automatically.
Remove the duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-12-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:36 +01:00
Brent Lu
eae0655316
ASoC: Intel: avs-rt298: remove redundant dapm routes
Two routes "AIF1 Playback<-sspX Tx" and "sspX Rx<-AIF1 Capture" are
created by snd_soc_dapm_connect_dai_link_widgets() automatically.
Remove the duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-11-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:35 +01:00
Brent Lu
cca1ac1f09
ASoC: Intel: avs-rt286: remove redundant dapm routes
Two routes "AIF1 Playback<-sspX Tx" and "sspX Rx<-AIF1 Capture" are
created by snd_soc_dapm_connect_dai_link_widgets() automatically.
Remove the duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-10-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:34 +01:00
Brent Lu
6227269fb3
ASoC: Intel: avs-rt274: remove redundant dapm routes
Two routes "AIF1 Playback<-sspX Tx" and "sspX Rx<-AIF1 Capture" are
created by snd_soc_dapm_connect_dai_link_widgets() automatically.
Remove the duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-9-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:33 +01:00
Brent Lu
ae7d66822d
ASoC: Intel: avs-nau8825: remove redundant dapm routes
Two routes "Playback<-sspX Tx" and "sspX Rx<-Capture" are created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-8-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:32 +01:00
Brent Lu
9868ca64fd
ASoC: Intel: avs-max98927: remove redundant dapm routes
Two routes "Left HiFi Playback<-sspX Tx" and
"Right HiFi Playback<-sspX Tx" are created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-7-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:31 +01:00
Brent Lu
b4df7ce990
ASoC: Intel: avs-max98373: remove redundant dapm routes
Two routes "Left HiFi Playback<-sspX Tx" and
"Right HiFi Playback<-sspX Tx" are created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-6-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:30 +01:00
Brent Lu
d48e3cd5aa
ASoC: Intel: avs-max98357a: remove redundant dapm routes
The route "HiFi Playback<-sspX Tx" is created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-5-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:30 +01:00
Brent Lu
12ea56d73c
ASoC: Intel: avs-hdaudio: remove redundant dapm routes
Three routes "HDMI 0 Playback<-hdaudioB0D2-cpu0 Tx",
"HDMI 1 Playback<-hdaudioB0D2-cpu1 Tx" and
"HDMI 2 Playback<-hdaudioB0D2-cpu2 Tx" are created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-4-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:29 +01:00
Brent Lu
c2076f4fa4
ASoC: Intel: avs-dmic: remove redundant dapm routes
Two routes "DMIC Rx<-Capture" and "DMIC WoV Rx<-Capture" are created
by snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-3-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:28 +01:00
Brent Lu
530ca0a7ed
ASoC: Intel: avs-da7219: remove redundant dapm routes
Two routes "Playback<-sspX Tx" and "sspX Rx<-Capture" are created by
snd_soc_dapm_connect_dai_link_widgets() automatically. Remove the
duplicate routes.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Link: https://lore.kernel.org/r/20230612110958.592674-2-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12 14:47:27 +01:00
Uday M Bhat
a0503817c0
ASoC: Intel: soc-acpi: add Rex CS42l42 and MAX98363 SoundWire entries
Add support to the following daughter card for rex:

SDW0: CS42l42 Headset
SDW2: MX98363 Speaker

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-29-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:33 +01:00
Uday M Bhat
164e5dc175
ASoC: Intel: sof_sdw: Add support for Rex soundwire
Add rex entry in the soundwire quirk table

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-28-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:32 +01:00
Uday M Bhat
dea4138d77
ASoC: Intel: sof_sdw: Add support for MAX98363 codec
Add support for MAX98363 soundwire codec. Update build
configuration to include this codec.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-27-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:31 +01:00
Uday M Bhat
fcb3f0fb4c
ASoC: Intel: sof_sdw: Modify maxim helper functions and structure names
Init function and structure names are modified to use maxim
instead of max98373. Card components and speaker names are
updated based on part id.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-26-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:30 +01:00
Uday M Bhat
85565f8047
ASoC: Intel: sof_sdw: Rename sof_sdw_max98373.c file to sof_sdw_maxim.c
This is needed to use the common implementation for other maxim
soundwire codecs

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-25-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:30 +01:00
Uday M Bhat
43cdea08a4
ASoC: Intel: sof_sdw: Add helper function for cs42l42 codec
Helper functions added to support CS42l42 soundwire codec.
Build configuration is updated to include this codec.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-24-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:29 +01:00
Terry Cheong
5dc51e5045
ASoC: Intel: Add rpl_rt1019_rt5682 driver
Boards were using this in older kernels before adl and rpl ids were
split. Add this back to maintain support.

Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:28 +01:00
Balamurugan C
1529d344dd
ASoC: Intel: Sof_ssp_amp: Correcting author name.
Corrected the author name camel case and initial.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:27 +01:00
Balamurugan C
c3a3c06e05
ASoC: Intel: ADL: Moving amp only boards into end of the table.
Moving amp only boards into end of the match table to have
better order and maintenance.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:26 +01:00
Balamurugan C
5376d37b2a
ASoC: Intel: ADL: Enable HDMI-In capture feature support for non-I2S codec boards.
Adding HDMI-In capture support for the products doesn't have onboard
I2S codec.but need to support HDMI-In capture via I2S and audio playback
through HDMI/DP monitor.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:25 +01:00
Pierre-Louis Bossart
332f618756
ASoC: Intel: sof-sdw: add Dell SKU 0B34
This device has no 3.5mm jack, only a single amplifier and mic codec.

Closes: https://github.com/thesofproject/linux/issues/4399
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:24 +01:00
Pierre-Louis Bossart
b62a1a839b
ASoC: Intel: soc-acpi: add tables for Dell SKU 0B34
Yet another permutation of devices.

Closes: https://github.com/thesofproject/linux/issues/4399
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:23 +01:00
Pierre-Louis Bossart
3daf02819a
ASoC: Intel: sof_sdw: add quick for Dell SKU 0BDA
The SKU numbering isn't quite consistent with the existing RaptorLake
SKUs but the PCI ID is definitively RaptorLake.

Closes: https://github.com/thesofproject/linux/issues/4380
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:22 +01:00
Pierre-Louis Bossart
eeb9f9f7e5
ASoC: Intel: soc-acpi: add table for RPL Dell SKU 0BDA
This is a standard configuration we've seen before for TGL.

Closes: https://github.com/thesofproject/linux/issues/4380
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:21 +01:00
Bard Liao
35d28ccd18
ASoC: Intel: sof_sdw: increase sdw pin index for each sdw link
To support multiple codecs per SoundWire link, we have to assign multiple
CPU DAIs to different DAI links sharing the same physical link. This is
not possible with the existing code since we assume that only 'Pin2' is
used for playback and 'Pin3' used for capture - additional DAIs cannot
be handled.

This patch enables more CPU DAIs to be used, e.g. "SDW0 Pin2",
"SDW0 Pin3", and "SDW0 Pin4" for SDW0-Playback-SimpleJack,
SDW0-Capture-SimpleJack, and SDW0-Playback-SmartAmp DAI links on physical
link #0.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:20 +01:00
Bard Liao
fbaaf80d8c
ASoC: Intel: sof_sdw: add rt713 support
rt713 is rt712 but without amp.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:19 +01:00
Bard Liao
9efa6f46bc
ASoC: Intel: soc-acpi-intel-mtl-match: add rt712 ID
Add rt712 ID for MTL.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:18 +01:00
Bard Liao
a2f4d70921
ASoC: Intel: soc-acpi-intel-tgl-match: add rt712 ID
Add rt712 ID for TGL.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:17 +01:00
Bard Liao
5360c67046
ASoC: Intel: sof_sdw: add rt712 support
Rt712 is a multi function codec which shpports headset, amp, and dmic
functions. Rt712 has two sdw interfaces and codec drivers, one for jack
and amp, the other for dmic. part id 0x712 is for jack and amp, and 0x1712
is for dmic.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:17 +01:00
Bard Liao
43f8012c3a
ASoC: Intel: sof_sdw: make rt711_sdca be generic
Let rename rt711_sdca to rt_sdca_jack and let it be used for all
Realtek sdca jacks.
The commit uses component->name_prefix to construct card->components,
and determine which codec it is. So, we have to set name_prefix
properly.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:16 +01:00
Bard Liao
752d4de4c6
ASoC: Intel: sof_sdw: rename SOF_RT711_JDSRC to SOF_JACK_JDSRC
Jack Detection source can be applied to all jacks, not only rt711.
No function changes.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:15 +01:00
Bard Liao
526a1876fc
ASoC: Intel: sof_sdw_rt_sdca_jack_common: test SOF_JACK_JDSRC in _exit
if (!SOF_RT711_JDSRC(sof_sdw_quirk)) is tested in rt711_sdca_add_codec_
device_props(), and we don't add software node to the device if jack
source is not set. We need to do the same test in
sof_sdw_rt711_sdca_exit(), and avoid removing software node if jack
source is not set.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:14 +01:00
Bard Liao
d3fc5c4da5
ASoC: Intel: sof_sdw: add multi dailink support for a codec
A codec may support multiple dais for different purpose. For example,
the rt712 codec supports jack and amp on different dais and machine
driver needs to create different dailink for those dais.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:13 +01:00
Bard Liao
5714aabdf9
ASoC: Intel: sdw_sof: append dai_type and remove codec_type
We append codec type to dailink name to distinguish different dailink
on the same sdw link and direction. But we could create multi dailinks
for a codec and the dailink name will be duplicated if we append codec
type to the dailink name.
Appending dai type instead of codec type can solve the issue.
For example, if a codec supports JACK on dai 0 and AMP on dai 1, the
existing code will create dailinks
SDW0-Playback-SimpleJack or SDW0-Playback-SmartAmp for both dailinks,
and it will be SDW0-Playback-SimpleJack for dailink 0 and
SDW0-Playback-SmartAmp for dailink 1 after this change.
Then codec type is not used any more and can be removed.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:12 +01:00
Bard Liao
cededa5a64
ASoC: Intel: sof_sdw: add codec_info pointer
codec_info_list[codec_index] is used multiple times in the
create_sdw_dailink() function. Adding a codec_info pointer to shorten
the code. This is a preparation for the following up patches.
No function changed.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:11 +01:00
Bard Liao
b274586533
ASoC: Intel: sof_sdw: use predefine dailink id
Currently, we assign dailink ids in order, and shift with codec type.
The purpose is to have consistent dailink ids for topologies.
This can be simplified if we have a predefined dailink id in
sof_sdw_dai_info.
We reuse the existing ids as the predefine ids. So the dailink ids will
not be changed by this commit.
With this change, we no longer need to check the adr order described in a
snd_soc_acpi_link_adr array.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:10 +01:00
Bard Liao
07140abbbf
ASoC: Intel: sof_sdw: add dai info
The existing code create a dailink for a codec. However, we may need
multi dailinks for a codec. This commit adds a new struct in
sof_sdw_codec_info{} to store the dai info of a codec.
The initial assumption if that we will create at most 3 dailink types
for a codec, since this is the max known with upcoming SDCA devices. We
may need to increase this number as new SDCA 'functions' become available.

One strong assumption is that all dailinks exposed are independent, as per
SDCA directions.

This commit just moves some items into the new sof_sdw_dai_info struct.
There is no function changed. Multi dais supported will be added in the
follow up commits.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:09 +01:00
Bard Liao
ba032909bb
ASoC: Intel: sof_sdw: add missing exit callback
Somehow .exit = sof_sdw_rt_amp_exit was missing in rt1318 codec info.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-05 14:00:08 +01:00
Claudiu Beznea
2f3092e77f
ASoC: do not include pm_runtime.h if not used
Do not include pm_runtime.h header in files where APIs exported by
pm_runtime.h are not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c
Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-23 13:55:55 +01:00
Amadeusz Sławiński
25148f57a2
ASoC: Intel: avs: Add missing checks on FE startup
Constraint functions have return values, they should be checked for
potential errors.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230519201711.4073845-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-22 11:18:26 +01:00
Amadeusz Sławiński
320f4d868b
ASoC: Intel: avs: Fix avs_path_module::instance_id size
All IPCs using instance_id use 8 bit value. Original commit used 16 bit
value because FW reports possible max value in 16 bit field, but in
practice FW limits the value to 8 bits.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230519201711.4073845-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-22 11:18:25 +01:00
Cezary Rojewski
836855100b
ASoC: Intel: avs: Account for UID of ACPI device
Configurations with multiple codecs attached to the platform are
supported but only if each from the set is different. Add new field
representing the 'Unique ID' so that codecs that share Vendor and Part
IDs can be differentiated and thus enabling support for such
configurations.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230519201711.4073845-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-22 11:18:24 +01:00