Commit graph

2171 commits

Author SHA1 Message Date
Mark Brown
b165457c50
Merge series "ASoC: dapm/pins: handle component prefix" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
SoundWire machine drivers make a heavy use of component prefixes to
uniquify control names. This however results in errors when looking
for widgets or pins. This patchset suggests two solutions but feedback
or suggestions on how to take the prefix into account would be
welcome.

Bard Liao (1):
  ASoC: Intel: boards: max98373: get dapm from cpu_dai

Shuming Fan (1):
  ASoC: dapm: use component prefix when checking widget names

 sound/soc/intel/boards/sof_maxim_common.c |  5 +++--
 sound/soc/soc-dapm.c                      | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

--
2.25.1
2021-02-10 20:10:03 +00:00
Pierre-Louis Bossart
717a8fdd15
ASoC: Intel: soc-acpi: add ACPI matching table for HP Spectre x360
This device only has a single amplifier on link1, so we need a
dedicated entry to find a match.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:50 +00:00
Bard Liao
3827b7ca39
ASoC: intel: sof_sdw: add trace for dai links
We create dai links dynamically, so it is not easy to know what dai
links are created. So adding trace for dai link name and id.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:49 +00:00
Rander Wang
f88dcb9b98
ASoC: Intel: sof_sdw: detect DMIC number based on mach params
Current driver create DMIC dai based on quirk for each platforms,
so we need to add quirk for new platforms. Now driver reports DMIC
number to machine driver and machine driver can create DMIC dai based
on this information. The old check is reserved for some platforms
may be failed to set the DMIC number in BIOS.

Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:48 +00:00
Pierre-Louis Bossart
209b0b0d8d
ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings
UCM needs to know which microphone is used (dmic or RT715-based),
let's add the information in the component string.

Note the slight change from HDAudio platforms where 'cfg-dmics' was
used. 'cfg-mics' is used here with the intent that this component
string describes either the number of PCH-attached microphones or the
number of RT715-attached ones (the assumption is that the two
configurations are mutually exclusive).

Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:47 +00:00
Pierre-Louis Bossart
d92e279dee
ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible
This set of devices has SoundWire support along with DMICs.
The DMI information was provided by users for 3 separate skus.

BugLink: https://github.com/thesofproject/linux/issues/2700
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:47 +00:00
Pierre-Louis Bossart
8caf37e2be
ASoC: Intel: sof-sdw: indent and add quirks consistently
Use the same style for all quirks to avoid misses and errors

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:46 +00:00
Pierre-Louis Bossart
3d09cf8d0d
ASoC: Intel: sof_sdw: reorganize quirks by generation
The quirk table is a mess, let's reorganize it by generation before
making sure that the quirks are consistent for each generation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:22:45 +00:00
Bard Liao
1183c35001
ASoC: Intel: boards: max98373: get dapm from cpu_dai
There is a prefix on max98373 codec, and the prefix will be added to
the pin name However, there is no prefix on the "Right Spk" and "Left
Spk" widgets.

To avoid getting a redundant prefix, we should get dapm from cpu_dai
component.

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/20210208234043.59750-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10 17:16:30 +00:00
Pierre-Louis Bossart
9a87fc1e06
ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102
Add a new ASoc Machine driver for Intel Baytrail platforms with a
Wolfson Microelectronics WM5102 codec.

This is based on a past contributions [1] from Paulo Sergio Travaglia
<pstglia@gmail.com> based on the Levono kernel [2] combined with
insights in things like the speaker GPIO from the android-x86 android
port for the Lenovo Yoga Tablet 2 1051F/L [3].

[1] https://patchwork.kernel.org/project/alsa-devel/patch/593313f5.3636c80a.50e05.47e9@mx.google.com/
[2] https://github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail/blob/cm-12.1/sound/soc/intel/board/byt_bl_wm5102.c
[3] https://github.com/Kitsune2222/Android_Yoga_Tablet_2-1051F_Kernel

The original machine driver from the Android ports was a crude modified
copy of bytcr_rt5640.c adjusted to work with the WM5102 codec.
This version has been extensively reworked to:

1. Remove all rt5640 related quirk handling. to the best of my knowledge
this setup is only used on the Lenovo Yoga Tablet 2 series (8, 10 and 13
inch models) which all use the same setup. So there is no need to deal
with all the variations with which we need to deal on rt5640 boards.

2. Rework clock handling, properly turn off the FLL and the platform-clock
when they are no longer necessary and don't reconfigure the FLL
unnecessarily when it is already running. This fixes a number of:
"Timed out waiting for lock" warnings being logged.

3. Add the GPIO controlled Speaker-VDD regulator as a DAPM_SUPPLY

This only adds the machine driver and ACPI hooks, the BYT-CR detection
quirk which these devices need will be added in a separate patch.

BugLink: https://github.com/thesofproject/linux/issues/2485
Co-authored-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210120214957.140232-6-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08 15:13:09 +00:00
Hans de Goede
8ade6d8b02
ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr()
Some Bay Trail systems:
1. Use a non CR version of the Bay Trail SoC
2. Contain at least 6 interrupt resources so that the
   platform_get_resource(pdev, IORESOURCE_IRQ, 5) check to workaround
   non CR systems which list their IPC IRQ at index 0 despite being
   non CR does not work
3. Despite 1. and 2. still have their IPC IRQ at index 0 rather then 5

Add a DMI quirk table to check for the few known models with this issue,
so that the right IPC IRQ index is used on these systems.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210120214957.140232-5-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08 15:13:08 +00:00
Sia Jee Heng
1c5f6e0714
ASoC: Intel: KMB: Support IEC958 encoded PCM format
Support ALSA IEC958 plugin for KeemBay I2S driver.
Bit manipulation needed as IEC958 format supported by ADV7511 HDMI chip
is not compatible with the ALSA IEC958 plugin format.

Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Link: https://lore.kernel.org/r/20210204014258.10197-5-jee.heng.sia@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08 11:39:53 +00:00
Mark Brown
2927e6d398
Merge branch 'asoc-5.11' into asoc-5.12 2021-02-05 15:01:21 +00:00
Pierre-Louis Bossart
5ab3ff4d66
ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3E
We missed adding the TGL_HDMI quirk which is very much needed to
expose the 4 display pipelines and will be required on TGL topologies.

Fixes: e787f5b5b1 ('ASoC: Intel: add support for new SoundWire hardware layout on TGL')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210204203312.27112-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05 13:12:37 +00:00
Pierre-Louis Bossart
45c92ec32b
ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A32
We missed adding the TGL_HDMI quirk which is very much needed to
expose the 4 display pipelines and will be required on TGL topologies.

Fixes: 488cdbd893 ('ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210204203312.27112-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05 13:12:36 +00:00
Pierre-Louis Bossart
f12bbc50f3
ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5E
We missed adding the TGL_HDMI quirk which is very much needed to
expose the 4 display pipelines and will be required on TGL topologies.

Fixes: 9ad9bc59dd ('ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210204203312.27112-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05 13:12:35 +00:00
Yang Li
e01a03db74
ASoC: Intel: catpt: remove unneeded semicolon
Eliminate the following coccicheck warning:
./sound/soc/intel/catpt/pcm.c:355:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/1612166481-121376-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03 16:23:09 +00:00
Kai Vehmanen
1fc96dc29c
ASoC: Intel: remove duplicate MODULE_LICENSE/DESCRIPTION tags
The snd-soc-acpi-intel-match has duplicate module tags for all
platforms separately. Remove all but one and save some storage
space and cleanup modinfo output.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210128105751.1049837-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28 17:11:39 +00:00
Libin Yang
e32df14235
ASoC: Intel: adl: remove sof_fw_filename setting in ADL snd_soc_acpi_mach
ADL will use sof-adl-s.ri if it is ADL-S platform. So let's use
the default_fw_filename in pdata->desc for the ADL FW filename.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210125070500.807474-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-27 17:28:28 +00:00
Libin Yang
3d14932527
ASoC: Intel: tgl: remove sof_fw_filename set for tgl_3_in_1_default
tgl_3_in_1_default link topology may be used by both TGL-LP and TGL-H.
Let's remove the sof_fw_filename setting in struct snd_soc_acpi_mach
and use the default_fw_filename setting in struct sof_dev_desc.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Tested-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210125070500.807474-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-27 12:35:20 +00:00
Libin Yang
9ad9bc59dd
ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E
Add flag "SOF_RT711_JD_SRC_JD2", flag "SOF_RT715_DAI_ID_FIX"
and "SOF_SDW_FOUR_SPK" to the Dell TGL-H based SKU "0A5E".

Signed-off-by: Libin Yang <libin.yang@intel.com>
Co-developed-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210125081117.814488-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-25 12:53:46 +00:00
Ricardo Ribalda
1d8fe0648e
ASoC: Intel: Skylake: Zero snd_ctl_elem_value
Clear struct snd_ctl_elem_value before calling ->put() to avoid any data
leak.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210121171644.131059-2-ribalda@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21 18:14:19 +00:00
Ricardo Ribalda
c1c3ba1f78
ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete
If dobj->control is not initialized we end up in an OOPs during
skl_tplg_complete:

[   26.553358] BUG: kernel NULL pointer dereference, address:
0000000000000078
[   26.561151] #PF: supervisor read access in kernel mode
[   26.566897] #PF: error_code(0x0000) - not-present page
[   26.572642] PGD 0 P4D 0
[   26.575479] Oops: 0000 [#1] PREEMPT SMP PTI
[   26.580158] CPU: 2 PID: 2082 Comm: udevd Tainted: G         C
5.4.81 #4
[   26.588232] Hardware name: HP Soraka/Soraka, BIOS
Google_Soraka.10431.106.0 12/03/2019
[   26.597082] RIP: 0010:skl_tplg_complete+0x70/0x144 [snd_soc_skl]

Fixes: 2d744ecf2b ("ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHL")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Tested-by: Lukasz Majczak <lma@semihalf.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210121171644.131059-1-ribalda@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21 18:14:18 +00:00
Takashi Iwai
d3afb00220
ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()
ASoC Intel Skylake driver still has explicit calls of dma_set_mask()
and dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-19 14:06:10 +00:00
Mark Brown
43fb2919d4
Merge series "ASoC: Intel: bytcr_rt5640: Add support for devices with only a headphone jack (no speakers/mic)" from Hans de Goede <hdegoede@redhat.com>:
Hi All,

This series adds support for devices with only a headphone jack
(no speakers/internal mic). Specifically this adds support for the
Mele PCG03 Mini PC. But the new no-speakers and no-internal-mic quirks
will likely be useful on other devices too.

Regards,

Hans
2021-01-12 16:40:28 +00:00
Hans de Goede
780b1a02c1
ASoC: Intel: cht_bsw_nau8824: Move snd_soc_dai_set_tdm_slot call to cht_codec_fixup
Move the snd_soc_dai_set_tdm_slot() call from cht_codec_init() to
cht_codec_fixup(). There are 2 reasons for doing this:

1. This aligns the cht_bsw_nau8824 with all the other BYT/CHT machine
drivers which also do this from their codec_fixup function.

2. When using the SOF driver, things like the TDM info is set from the
topology file. Moving the call to the codec_fixup function, which gets
skipped when using the SOF driver avoids the call interfering with the
settings when using the SOF driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210107115324.11602-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-12 14:11:59 +00:00
Hans de Goede
df33032146
ASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PC
Add a quirk for the Mele PCG03 Mini PC, being a Mini PC this device
has no speakers and no internal microphone.

To make matters worse the speaker output pins are shorted (to gnd or
to each other?) and SPKVDD is provided. So trying to output sound on the
speakers leads to shorting SPKVDD, this leads to a power dip after
which the codec is an unknown state. Sometimes it drops of the i2c
bus, sometimes it does still respond to i2c transfers, but is otherwise
not functional. TL;DR: trying to use the speaker outputs on this model
is BAD.

Besides not having speakers / an internal mic, this is a Bay Trail CR
device without a CHAN package in ACPI, so we default to SSP0-AIF2 as
codec connection. But the device is actually using SSP0-AIF1, so we
need to quirk that too.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-12 14:11:57 +00:00
Hans de Goede
46466ab68e
ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping
Some devices, like mini PCs/media/top-set boxes do not have an internal
microphone at all, an example of the is the Mele PCG03 Mini PC.

Add a new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping for this,
which does not add any internal-mic routes and modifies the components
and the (optional) long_name strings to reflect this.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-12 14:11:56 +00:00
Hans de Goede
1851ccf9e1
ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flag
Some devices, like mini PCs/media/top-set boxes do not have any speakers
at all, an example of the is the Mele PCG03 Mini PC.

Add a new BYT_RT5640_NO_SPEAKERS quirk-flag which when sets does not add
speaker routes and modifies the components and the (optional) long_name
strings to reflect that there are no speakers.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210109210119.159032-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-12 14:11:55 +00:00
Michael Sit Wei Hong
11b943c06a
ASoC: Intel: KMB: Enable DMA transfer mode
Enable DMA transfer mode for Intel Keem Bay ASoC platform driver.

The driver will search the device tree for DMA resources at boot
time to enable DMA transfer mode, and will proceed to use DMA
transfer if the resource is available, otherwise the default PIO
mode will be used.

Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210108031248.20520-6-michael.wei.hong.sit@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-08 18:23:41 +00:00
Hans de Goede
aac568269b
ASoC: Intel: bytcht_es8316: Remove comment about SSP0 being untested
Remove a stale comment about SSP0 being untested, the
bytcht_es8316 has supported SSP0 for a while now and this has
been successfully tested on a GP electrinic T701 tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210107120757.12051-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-07 16:14:12 +00:00
Tzung-Bi Shih
81a6320da7
ASoC: rt1015: remove bclk_ratio
bclk_ratio is unused.  Removes bclk_ratio and .set_bclk_ratio callback.

Removes snd_soc_dai_set_bclk_ratio() in a few machine drivers which are
obviously using rt1015.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201224101854.3024823-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-05 14:34:18 +00:00
Christophe JAILLET
49d411f2c9
ASoC: Intel: common: Fix some typos
s/apci/acpi/

Turn an ICL into a TGL because it is likely a cut'n'paste error

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20201229085103.192715-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-29 12:37:03 +00:00
Mark Brown
f81325a05e Linux 5.11-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl/pGQ4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGSCsH/AmJzlif2P7bMT12
 2SiVnl/BfK4iHVdGMQPaLZNJVrjFLzhRUj1WiOye0rKq0jp21IVJgwpshiWZeqEg
 8BfT4UEMfdl5uaYIX/7G9AhD2JUy9UHs0VhQEf4oueDAmNl+q2btlXZh/tayqjqc
 DOqLtyJKYRswfBTh260w8/W5EPXJq5IlWf/vOpgGphFWMwolqIAgIlCTulE8pcO6
 EiPuC3tOxBg8zkEkjV94Bvu4+73Hgr8O6beCbbqZlvuTpWci/X1hcVyA+IsGFvL8
 h0YpMrEzvQoroJAVFh7u2KKrU6pObQWsjRb1F7LQIBIGC7hvnzXSzwH2IZQfyFJd
 p/ASNk8=
 =564c
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl/p6NoACgkQJNaLcl1U
 h9BhOQf/QwH0VD/ZPl6Y/P+LzXVBBdwIF9F8bwfzr/czFY22Eb1Pf57vJmZmaz6J
 YHH6Tbdn7A/ROvZGbyp5DKPCu19gvPRyw1E0YdOwS6m4JdxXxCWvVFl3NGiBWkuL
 8HB8PvM8fkR1ix1+OW5vvKt5rItPcAfp17P1Iao34GxqTj/gHox65TRWKynCAhht
 uBgfuMXcwMRIV+6KRUIhTkocba1BDUZC3apnWq0k59A1r3j/niKpED26FWlZIzhN
 +DiDAgQQIe9iZ+T+MB6cYiu3nWsg03g5sPpLlFJuXwTUmgtJqfBlji7ysc5yQmVE
 ezjJdJ5FQll/Ddg953QV+42GSy+3hQ==
 =Sr/M
 -----END PGP SIGNATURE-----

Merge tag 'v5.11-rc1' into asoc-5.11

Linux 5.11-rc1
2020-12-28 14:16:53 +00:00
Andy Shevchenko
a9830fc388
catpt: Switch to use list_entry_is_head() helper
Since we got list_entry_is_head() helper in the generic header,
we may switch catpt to use it. It removes the need in additional variable.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201214172138.44267-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-28 12:24:42 +00:00
Mark Brown
984fcd3f4e
Merge existing fixes from asoc/for-5.11 2020-12-28 12:24:15 +00:00
Cezary Rojewski
bb224c3e3e
ASoC: Intel: haswell: Add missing pm_ops
haswell machine board is missing pm_ops what prevents it from undergoing
suspend-resume procedure successfully. Assign default snd_soc_pm_ops so
this is no longer the case.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201217105401.27865-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-17 14:24:43 +00:00
Linus Torvalds
aab7ce2b09 ACPI updates for 5.11-rc1
- Update ACPICA code in the kernel to upstream revision 20201113
    with changes as follows:
 
    * Add 5 new UUIDs to the known UUID table (Bob Moore).
    * Remove extreaneous "the" in comments (Colin Ian King).
    * Add function trace macros to improve debugging (Erik Kaneda).
    * Fix interpreter memory leak (Erik Kaneda).
    * Handle "orphan" _REG for GPIO OpRegions (Hans de Goede).
 
  - Introduce resource_union() and resource_intersection() helpers
    and clean up some resource-manipulation code with the help of
    them (Andy Shevchenko).
 
  - Revert problematic commit related to the handling of resources
    in the ACPI core (Daniel Scally).
 
  - Extend the ACPI device enumeration documentation and the
    gpio-line-names _DSD property documentation, clean up the
    latter (Flavio Suligoi).
 
  - Clean up _DEP handling during device enumeration, modify the list
    of _DEP exceptions and the handling of it and fix up terminology
    related to _DEP (Hans de Goede, Rafael Wysocki).
 
  - Eliminate in_interrupt() usage from the ACPI EC driver (Sebastian
    Andrzej Siewior).
 
  - Clean up the advance_transaction() routine and related code in
    the ACPI EC driver (Rafael Wysocki).
 
  - Add new backlight quirk for GIGABYTE GB-BXBT-2807 (Jasper
    St. Pierre).
 
  - Make assorted janitorial changes in several ACPI-related pieces
    of code (Hanjun Guo, Jason Yan, Punit Agrawal).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl/Y80sSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxLnsP/0B+6dSTqLp7S1UJbScta1gKnDwyFGAi
 eA3MqyMfF08DiwWocJoDDjttxo5d+0NV2g9LdcScdwGrKB9ddWuhA6/IT83B7YA8
 K4Yie4Gm1StLR+rs+zLJy9GBQE3P/Ya058WJJ+mvaTkn4SlI1qf8ZhOEzlCArWpM
 0g9+Y7n16A8/9dTTd8eVf80UrPLOuxPPIZuSsCdZCDEOLGPH+zJive0X0wEqsXvU
 hiq8DymH2ooIcscYXu3wEKtAfcxUjGhmrK8/M7dJ1j9Mh7JxQsIIcQIQogG2uE53
 Gm71E1LkQg3FYzFCYmtSNgOnjMMDfV3r/WH4f49kK1Hajn2erYvEv5kXpF+J+Q6X
 rXXRk17puszq5/gvrebDFpUou7MmV4smOeXPQIobJuXnc9c48QEBqx8tshuJXsVv
 5EzD6tITGl/iLu3bqH5M9G5BjIZYB9kjUPzxJ3ezl9rtJXsiMN21MkM4j3KR1rnW
 g3JYMuw1hwa9wVNFraMyCOtcfncCPJNzdi9TT3ZzMDLHTKbd0jmpyBKws+dI5G1z
 y7utKOi65utX6mTtOwhITVbSu7Gura7FRXkxo3K7kG8WViYXhDvB1mLylrpipNDl
 ZWgX6XMYEtRhSvvTwZM0Wcgs9p2JIgfQvbz1Q9pv5FLbf1nceRMaiiGrJTPiGYZD
 /maVvuddxEWM
 =5LZe
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These update the ACPICA code in the kernel to upstream revision
  20201113, fix and clean up some resources manipulation code, extend
  the enumeration and gpio-line-names property documentation, clean up
  the handling of _DEP during device enumeration, add a new backlight
  DMI quirk, clean up transaction handling in the EC driver and make
  some assorted janitorial changes.

  Specifics:

   - Update ACPICA code in the kernel to upstream revision 20201113 with
     changes as follows:
       * Add 5 new UUIDs to the known UUID table (Bob Moore)
       * Remove extreaneous "the" in comments (Colin Ian King)
       * Add function trace macros to improve debugging (Erik Kaneda)
       * Fix interpreter memory leak (Erik Kaneda)
       * Handle "orphan" _REG for GPIO OpRegions (Hans de Goede)

   - Introduce resource_union() and resource_intersection() helpers and
     clean up some resource-manipulation code with the help of them
     (Andy Shevchenko)

   - Revert problematic commit related to the handling of resources in
     the ACPI core (Daniel Scally)

   - Extend the ACPI device enumeration documentation and the
     gpio-line-names _DSD property documentation, clean up the latter
     (Flavio Suligoi)

   - Clean up _DEP handling during device enumeration, modify the list
     of _DEP exceptions and the handling of it and fix up terminology
     related to _DEP (Hans de Goede, Rafael Wysocki)

   - Eliminate in_interrupt() usage from the ACPI EC driver (Sebastian
     Andrzej Siewior)

   - Clean up the advance_transaction() routine and related code in the
     ACPI EC driver (Rafael Wysocki)

   - Add new backlight quirk for GIGABYTE GB-BXBT-2807 (Jasper St
     Pierre)

   - Make assorted janitorial changes in several ACPI-related pieces of
     code (Hanjun Guo, Jason Yan, Punit Agrawal)"

* tag 'acpi-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (40 commits)
  ACPI: scan: Fix up _DEP-related terminology with supplier/consumer
  ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[]
  ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807
  Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
  ACPI: scan: Add PNP0D80 to the _DEP exceptions list
  ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object()
  ACPI: scan: Add acpi_info_matches_hids() helper
  ACPICA: Update version to 20201113
  ACPICA: Interpreter: fix memory leak by using existing buffer
  ACPICA: Add function trace macros to improve debugging
  ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions
  ACPICA: Remove extreaneous "the" in comments
  ACPICA: Add 5 new UUIDs to the known UUID table
  resource: provide meaningful MODULE_LICENSE() in test suite
  ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  ACPI: processor: Drop duplicate setting of shared_cpu_map
  ACPI: EC: Clean up status flags checks in advance_transaction()
  ACPI: EC: Untangle error handling in advance_transaction()
  ACPI: EC: Simplify error handling in advance_transaction()
  ACPI: EC: Rename acpi_ec_is_gpe_raised()
  ...
2020-12-15 16:39:06 -08:00
Rafael J. Wysocki
5e2cde03da Merge branches 'acpi-resources' and 'acpi-docs'
* acpi-resources:
  Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
  resource: provide meaningful MODULE_LICENSE() in test suite
  ASoC: Intel: catpt: Replace open coded variant of resource_intersection()
  ACPI: watchdog: Replace open coded variant of resource_union()
  PCI/ACPI: Replace open coded variant of resource_union()
  resource: Add test cases for new resource API
  resource: Introduce resource_intersection() for overlapping resources
  resource: Introduce resource_union() for overlapping resources
  resource: Group resource_overlaps() with other inline helpers
  resource: Simplify region_intersects() by reducing conditionals

* acpi-docs:
  Documentation: ACPI: enumeration: add PCI hierarchy representation
  Documentation: ACPI: _DSD: enable hyperlink in final references
  Documentation: ACPI: explain how to use gpio-line-names
2020-12-15 15:30:03 +01:00
Dan Carpenter
f373a811fd
ASoC: Intel: fix error code cnl_set_dsp_D0()
Return -ETIMEDOUT if the dsp boot times out instead of returning
success.

Fixes: cb6a552846 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/X9NEvCzuN+IObnTN@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-14 17:29:59 +00:00
Takashi Iwai
598100be30 ASoC: Updates for v5.11
There's a lot of changes here but mostly cleanups and driver specific
 things, the most user visible change is the support for boot time
 selection of Intel DSP firmware which will make it easier for people to
 move over to the preferred modern implementations in distros and other
 large scale deployments.
 
 This also includes a merge of the new auxillary bus which was done in
 anticipation of use by the Intel DSP drivers which didn't quite make it.
 
  - Lots more cleanups and simplifications from Morimoto-san.
  - Support for some basic DPCM systems in the audio graph card from
    Sameer Pujar.
  - Remove some old pre-DT Freescale drivers for platforms that are now
    DT only.
  - Move selection of which Intel DSP implementation to use to boot time
    rather than requiring it to be selected at build time.
  - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel
    Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715,
    Qualcomm SM8250 and simple GPIO based muxes.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl/XcxYACgkQJNaLcl1U
 h9ApEgf/ZkKxj1Nq6RCfUqhyGK2u1ktzCpnugvjHebutXV1LD0y+y0/CnjdN5Vou
 8r+BsX6izfEx6JuZyu1ryQcz+Rsp6VH6uK9e/vRPExIkkAw+JQzEGVzQRyrnREoA
 eV8BO92YKrRtJM1HoIBnQOhoWMc/4Kqi7hklaiXDhHRDGpLcbTyeVK8ROarORLcy
 aupt7WinLvbhP++xjs9YR/RffjpwxyxOkmkIaM9TpkKqADays+sBDCZXSVgFjQik
 1rFLQ8jYAb/EOPNdCXrMEILrSaNMCz719vh2gZkm1yYQ3Tp5dH9WGqLROq9Oy/D4
 FaCGJoxX0HUe7MWbJeI97PFZB8i2gQ==
 =iCuN
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.11

There's a lot of changes here but mostly cleanups and driver specific
things, the most user visible change is the support for boot time
selection of Intel DSP firmware which will make it easier for people to
move over to the preferred modern implementations in distros and other
large scale deployments.

This also includes a merge of the new auxillary bus which was done in
anticipation of use by the Intel DSP drivers which didn't quite make it.

 - Lots more cleanups and simplifications from Morimoto-san.
 - Support for some basic DPCM systems in the audio graph card from
   Sameer Pujar.
 - Remove some old pre-DT Freescale drivers for platforms that are now
   DT only.
 - Move selection of which Intel DSP implementation to use to boot time
   rather than requiring it to be selected at build time.
 - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel
   Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715,
   Qualcomm SM8250 and simple GPIO based muxes.
2020-12-14 15:57:14 +01:00
Takashi Iwai
e5fab13a7c Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-14 09:05:29 +01:00
Mark Brown
460aa020f5
Merge remote-tracking branch 'asoc/for-5.11' into asoc-next 2020-12-11 17:48:04 +00:00
Kai Vehmanen
4c8a4cab33
ASoC: Intel: common: add ACPI matching tables for Alder Lake
Initial support for ADL w/ RT711

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20201209153102.3028310-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09 16:52:04 +00:00
Chris Chiu
1bea2256aa
ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140
Tha ARCHOS Cesium 140 tablet has problem with the jack-sensing,
thus the heaset functions are not working.

Add quirk for this model to select the correct input map, jack-detect
options and channel map to enable jack sensing and headset microphone.
This device uses IN1 for its internal MIC and JD2 for jack-detect.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201208060414.27646-1-chiu@endlessos.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09 12:12:57 +00:00
Hans de Goede
748e72e869
ASoC: Intel: cht_bsw_nau8824: Change SSP2-Codec DAI id to 0
The snd-soc-sst-acpi driver does not care about the id specified for
the SSP2-Codec DAI, but it does matter for the snd-sof-acpi driver;
and when it is not 0 then the snd-sof-acpi driver does not work.

Set the SSP2-Codec DAI id to 0, fixing the snd-sof-acpi driver not
working on devices using the cht_bsw_nau8824 machine-driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201206122436.13553-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08 14:20:33 +00:00
Hans de Goede
e60ffc48fa
ASoC: Intel: cht_bsw_nau8824: Drop compress-cpu-dai bits
When using the snd-soc-sst-acpi driver then the compress-cpu-dai bits are
not used, the cht_bsw_nau8824 machine-driver is the only BYT/CHT driver
defining them.

When using the snd-sof-acpi driver then the presence of the
compress-cpu-dai bits breaks things because the sof topology file for
by/cht devices does not contain routing info for them.

Drop the compress-cpu-dai bits, fixing the snd-sof-acpi driver not
working on devices using the cht_bsw_nau8824 machine-driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201206122436.13553-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08 14:20:32 +00:00
Brent Lu
aa6cc97c0a
ASoC: intel: sof_rt5682: Add support for tgl_rt1011_rt5682
This patch adds the driver data for two rt1011 speaker amplifiers on
SSP1 and rt5682 on SSP0 for TGL platform. DAI format for rt1011 is
leveraged from cml_rt1011_rt5682 which is 4-slot tdm with 100fs bclk.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201203154010.29464-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-04 23:26:35 +00:00
Sathyanarayana Nujella
0d7f2459ae
ASoC: Intel: Boards: tgl_max98373: update TDM slot_width
Speaker amp's SSP bclk configuration was changed in the topology file to be
based on 12.288MHz and dai_ops->hw_params is based on s32le format.
But, the TDM slot size remained set to 24 bits.
This inconsistency created audible noises and needs to be corrected.
This patch updates TDM slot width to 32.

Fixes: bc7477fc2a ("ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params")

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201201211150.433472-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02 13:34:43 +00:00
Mark Brown
e5879d9882
Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11 2020-11-30 16:05:07 +00:00