Commit graph

49247 commits

Author SHA1 Message Date
Cezary Rojewski
c303a994e5
ASoC: Intel: avs: Store pointer to adev in DAI dma_data
Reduce the number of to_avs_dev() casts by storing the driver context in
DAI's dma_data.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:49 +09:00
Cezary Rojewski
b9d59f970e
ASoC: Intel: avs: Remove redundancy around DAI shutdown
Move avs_dai_nonhda_be_shutdown() to avs_dai_shutdown() as the function
is common for all transfer types, not just non-HDAudio ones. Use it
to simplify avs_dai_fe_shutdown().

While at it, fix explicit kfree(data) and use the destructor instead.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:48 +09:00
Cezary Rojewski
140df6d4d5
ASoC: Intel: avs: Relocate HDA BE DAI specific operations
DAI's startup()/shutdown() shall deal with allocation and freeing of
resources needed to facilitate streaming over it. Currently for HDAudio
BE DAIs some of that task is done in component->open()/close(). Relocate
the relevant pieces to address that.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:47 +09:00
Cezary Rojewski
31a70a71b3
ASoC: pcm: Reverse iterate DAIs when shutting them down
During startup snd_soc_dai_startup() is launched in ascending order and
the exact same thing is done during shutdown procedure. Reverse the
order in the latter so that it is symmetric to the former.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:46 +09:00
Brent Lu
3d84e07025
ASoC: Intel: sof-rt5682: support bclk as PLL source on rt5682s
For rt5682s codec, we could use bclk as PLL source when the frequency
is 3.072MHz but no 2.4MHz. Update the code to select correct pll_id
and clk_id for 3.072MHz bclk.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-24-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:21 +09:00
Brent Lu
4524b1e3ef
ASoC: Intel: sof-rt5682: get bclk frequency from topology
A different bclk frequency 3.072MHz was introduced to tgl platform and
is used in mtl topologies. Use SOF API to get frequency from topology
instead of hardcoding.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:20 +09:00
Brent Lu
b5aaf6a56d
ASoC: Intel: sof-rt5682: setup pll_id only when needed
The variable 'pll_id' is needed only when we use snd_soc_dai_set_pll()
to setup PLL. Move the code segment to improve some readability.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:19 +09:00
Brent Lu
76f33e2f93
ASoC: Intel: sof-rt5682: add driver_data to sof_rt5682 board
Move default BYT/CHT quirk to driver_data of sof_rt5682 board. This
fixes a problem that DMI quirk of Minnowboard board got overwritten in
probe function since it's a BYT board.

Fixes: c68e07970e ("ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI's")
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:18 +09:00
Brent Lu
76fb0d3221
ASoC: Intel: sof_rt5682: add icl_rt5682_def for icl boards
Add the board config icl_rt5682_def to rt5682 machine driver for all
icl boards using default SSP port allocation (headphone codec on SSP0).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:17 +09:00
Brent Lu
207255f3ae
ASoC: Intel: sof-rt5682: remove SOF_RT5682_MCLK_BYTCHT_EN
We don't need this quirk flag since 'is_legacy_cpu' will be true if
this is a BYT/CHT board.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:17 +09:00
Brent Lu
e91d54f8b1
ASoC: Intel: sof-rt5682: add mclk_en to sof_rt5682_private
Add a variable mclk_en to sof_rt5682_private structure to reduce
global variable access. No functional change.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:16 +09:00
Brent Lu
0cb6a8134c
ASoC: Intel: glk_rt5682_max98357a: delete driver
Delete this driver and use sof_rt5682 machine driver instead.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:15 +09:00
Brent Lu
5498a4edbf
ASoC: Intel: sof_rt5682: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine
driver glk_rt5682_mx98357a with sound card name glkrt5682max. Use same
name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:14 +09:00
Brent Lu
44567d3d62
ASoC: Intel: sof_rt5682: add glk_rt5682_def for glk boards
Add the board config glk_rt5682_def to rt5682 machine driver for all
glk boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:13 +09:00
Brent Lu
8d6114b81d
ASoC: Intel: bxt_da7219_max98357a: remove glk support
Remove glk platform support and use sof_da7219 machine driver instead
for existing glk boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu
f46b768b72
ASoC: Intel: sof_da7219: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name glkda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu
c7f9523d21
ASoC: Intel: sof_da7219: add glk_da7219_def for glk boards
Add the board config glk_da7219_def to da7219 machine driver for all
glk boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:11 +09:00
Brent Lu
35ca48662c
ASoC: Intel: bxt_da7219_max98357a: remove cml support
Remove cml platform support and use sof_da7219 machine driver instead
for existing cml boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:10 +09:00
Brent Lu
e895d16f4e
ASoC: Intel: sof_da7219: support MAX98357A on cml boards
For cml boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cmlda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:09 +09:00
Brent Lu
7873252c0e
ASoC: Intel: sof_da7219: support MAX98357A
Add support to Maxim MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:08 +09:00
Bard Liao
5b093b0b47
ASoC: Intel: sof_rt5682: add missing MAX98357A config
sof_rt5682 supports MAX98357A/MAX98360A amp. Select SND_SOC_MAX98357A
as needed.

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/20240426152529.38345-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu
12e5fe68d0
ASoC: Intel: bxt_da7219_max98357a: remove MAX98390 support
Remove MAX98390 support and use sof_da7219 machine driver instead for
existing cml boards with MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu
5a2bc761fa
ASoC: Intel: sof_da7219: support MAX98390 on cml boards
For cml boards, MAX98390 speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cml_max98390_da7219.
Use same name for backward compatibility with existing devices on
market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:06 +09:00
Brent Lu
a0cf86d813
ASoC: Intel: sof_da7219: add cml_da7219_def for cml boards
Add the board config cml_da7219_def to da7219 machine driver for all
cml boards using default SSP port allocation (headphone codec on SSP0,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:05 +09:00
Brent Lu
b7654a7e21
ASoC: Intel: sof_da7219: support MAX98390
Add support to Maxim MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:04 +09:00
Brent Lu
3b3ed47526
ASoC: Intel: sof_maxim_common: support MAX98390 on cml boards
Add support for 2xMAX98390 speaker amplifier running in I2S mode for
existing cml boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:03 +09:00
Brent Lu
d2d377fc22
ASoC: Intel: nau8825/rt5682: move speaker widget to common modules
Two machine drivers sof_rt5682 and sof_nau8825 always register two
speaker widgets 'Left Spk' and 'Right Spk' regardless the actual
number of speakers. Move the widget registration to speaker common
modules to avoid useless speaker widgets for 1 or 4 speaker boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:02 +09:00
Colin Ian King
fe2a841337
ASoc: PCM6240: Fix spelling mistake: "deley" -> "delay"
There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240423074428.1313777-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-24 10:13:36 +09:00
Jack Yu
bda16500dd
ASoC: rt715-sdca: volume step modification
Volume step (dB/step) modification to fix format error
which shown in amixer control.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/b1f546ad16dc4c7abb7daa7396e8345c@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 17:50:38 +09:00
Dan Carpenter
181d58cfe9
ASoC: cs35l41: Delete unnecessary condition in cs35l41_pcm_hw_params()
This code returns -EINVAL if "i" is out of bounds a few lines earlier.
Delete this unnecessary check and pull the code in a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/1ee32bfb-6f6c-4b61-887b-6f655abbfc47@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 14:24:01 +09:00
Simon Trimmer
f2602fba47
ASoC: cs35l56: Avoid static analysis warning of uninitialised variable
Static checkers complain that the silicon_uid variable passed by
pointer to cs35l56_read_silicon_uid() could later be used
uninitialised when calling cs_amp_get_efi_calibration_data().

cs35l56_read_silicon_uid() must have succeeded to call
cs_amp_get_efi_calibration_data() and that would have populated the
variable.

However, initialise the value so we are not haunted by it forevermore.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Fixes: e1830f66f6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240422103211.236063-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 10:34:08 +09:00
Mark Brown
710f9a3673
ASoC: PCM6240: New driver
Merge series from Shenghao Ding <shenghao-ding@ti.com>:

mixer-test report:
 root@am335x-evm:/bin# mixer-test
 TAP version 13
 # Card 0 - TI BeagleBone Black (TI BeagleBone Black)
 1..455
 ok 1 get_value.0.64
 # 0.64 PCMD3180 i2c2 Profile id
 ok 2 name.0.64
 ok 3 write_default.0.64
 ok 4 write_valid.0.64
 ok 5 write_invalid.0.64
 ok 6 event_missing.0.64
 ok 7 event_spurious.0.64
 ok 8 get_value.0.63
 # 0.63 PCMD3180 i2c2 Dev3 Ch8 Digi Volume
 ok 9 name.0.63
 ok 10 write_default.0.63
 ok 11 write_valid.0.63
 ok 12 write_invalid.0.63
 ok 13 event_missing.0.63
 ok 14 event_spurious.0.63
 ok 15 get_value.0.62
 # 0.62 PCMD3180 i2c2 Dev3 Ch7 Digi Volume
 ok 16 name.0.62
 ok 17 write_default.0.62
 ok 18 write_valid.0.62
 ok 19 write_invalid.0.62
 ok 20 event_missing.0.62
 ok 21 event_spurious.0.62
 ok 22 get_value.0.61
 # 0.61 PCMD3180 i2c2 Dev3 Ch6 Digi Volume
 ok 23 name.0.61
 ok 24 write_default.0.61
 ok 25 write_valid.0.61
 ok 26 write_invalid.0.61
 ok 27 event_missing.0.61
 ok 28 event_spurious.0.61
 ok 29 get_value.0.60
 # 0.60 PCMD3180 i2c2 Dev3 Ch5 Digi Volume
 ok 30 name.0.60
 ok 31 write_default.0.60
 ok 32 write_valid.0.60
 ok 33 write_invalid.0.60
 ok 34 event_missing.0.60
 ok 35 event_spurious.0.60
 ok 36 get_value.0.59
 # 0.59 PCMD3180 i2c2 Dev3 Ch4 Digi Volume
 ok 37 name.0.59
 ok 38 write_default.0.59
 ok 39 write_valid.0.59
 ok 40 write_invalid.0.59
 ok 41 event_missing.0.59
 ok 42 event_spurious.0.59
 ok 43 get_value.0.58
 # 0.58 PCMD3180 i2c2 Dev3 Ch3 Digi Volume
 ok 44 name.0.58
 ok 45 write_default.0.58
 ok 46 write_valid.0.58
 ok 47 write_invalid.0.58
 ok 48 event_missing.0.58
 ok 49 event_spurious.0.58
 ok 50 get_value.0.57
 # 0.57 PCMD3180 i2c2 Dev3 Ch2 Digi Volume
 ok 51 name.0.57
 ok 52 write_default.0.57
 ok 53 write_valid.0.57
 ok 54 write_invalid.0.57
 ok 55 event_missing.0.57
 ok 56 event_spurious.0.57
 ok 57 get_value.0.56
 # 0.56 PCMD3180 i2c2 Dev3 Ch1 Digi Volume
 ok 58 name.0.56
 ok 59 write_default.0.56
 ok 60 write_valid.0.56
 ok 61 write_invalid.0.56
 ok 62 event_missing.0.56
 ok 63 event_spurious.0.56
 ok 64 get_value.0.55
 # 0.55 PCMD3180 i2c2 Dev3 Ch8 Fine Volume
 ok 65 name.0.55
 ok 66 write_default.0.55
 ok 67 write_valid.0.55
 ok 68 write_invalid.0.55
 ok 69 event_missing.0.55
 ok 70 event_spurious.0.55
 ok 71 get_value.0.54
 # 0.54 PCMD3180 i2c2 Dev3 Ch7 Fine Volume
 ok 72 name.0.54
 ok 73 write_default.0.54
 ok 74 write_valid.0.54
 ok 75 write_invalid.0.54
 ok 76 event_missing.0.54
 ok 77 event_spurious.0.54
 ok 78 get_value.0.53
 # 0.53 PCMD3180 i2c2 Dev3 Ch6 Fine Volume
 ok 79 name.0.53
 ok 80 write_default.0.53
 ok 81 write_valid.0.53
 ok 82 write_invalid.0.53
 ok 83 event_missing.0.53
 ok 84 event_spurious.0.53
 ok 85 get_value.0.52
 # 0.52 PCMD3180 i2c2 Dev3 Ch5 Fine Volume
 ok 86 name.0.52
 ok 87 write_default.0.52
 ok 88 write_valid.0.52
 ok 89 write_invalid.0.52
 ok 90 event_missing.0.52
 ok 91 event_spurious.0.52
 ok 92 get_value.0.51
 # 0.51 PCMD3180 i2c2 Dev3 Ch4 Fine Volume
 ok 93 name.0.51
 ok 94 write_default.0.51
 ok 95 write_valid.0.51
 ok 96 write_invalid.0.51
 ok 97 event_missing.0.51
 ok 98 event_spurious.0.51
 ok 99 get_value.0.50
 # 0.50 PCMD3180 i2c2 Dev3 Ch3 Fine Volume
 ok 100 name.0.50
 ok 101 write_default.0.50
 ok 102 write_valid.0.50
 ok 103 write_invalid.0.50
 ok 104 event_missing.0.50
 ok 105 event_spurious.0.50
 ok 106 get_value.0.49
 # 0.49 PCMD3180 i2c2 Dev3 Ch2 Fine Volume
 ok 107 name.0.49
 ok 108 write_default.0.49
 ok 109 write_valid.0.49
 ok 110 write_invalid.0.49
 ok 111 event_missing.0.49
 ok 112 event_spurious.0.49
 ok 113 get_value.0.48
 # 0.48 PCMD3180 i2c2 Dev3 Ch1 Fine Volume
 ok 114 name.0.48
 ok 115 write_default.0.48
 ok 116 write_valid.0.48
 ok 117 write_invalid.0.48
 ok 118 event_missing.0.48
 ok 119 event_spurious.0.48
 ok 120 get_value.0.47
 # 0.47 PCMD3180 i2c2 Dev2 Ch8 Digi Volume
 ok 121 name.0.47
 ok 122 write_default.0.47
 ok 123 write_valid.0.47
 ok 124 write_invalid.0.47
 ok 125 event_missing.0.47
 ok 126 event_spurious.0.47
 ok 127 get_value.0.46
 # 0.46 PCMD3180 i2c2 Dev2 Ch7 Digi Volume
 ok 128 name.0.46
 ok 129 write_default.0.46
 ok 130 write_valid.0.46
 ok 131 write_invalid.0.46
 ok 132 event_missing.0.46
 ok 133 event_spurious.0.46
 ok 134 get_value.0.45
 # 0.45 PCMD3180 i2c2 Dev2 Ch6 Digi Volume
 ok 135 name.0.45
 ok 136 write_default.0.45
 ok 137 write_valid.0.45
 ok 138 write_invalid.0.45
 ok 139 event_missing.0.45
 ok 140 event_spurious.0.45
 ok 141 get_value.0.44
 # 0.44 PCMD3180 i2c2 Dev2 Ch5 Digi Volume
 ok 142 name.0.44
 ok 143 write_default.0.44
 ok 144 write_valid.0.44
 ok 145 write_invalid.0.44
 ok 146 event_missing.0.44
 ok 147 event_spurious.0.44
 ok 148 get_value.0.43
 # 0.43 PCMD3180 i2c2 Dev2 Ch4 Digi Volume
 ok 149 name.0.43
 ok 150 write_default.0.43
 ok 151 write_valid.0.43
 ok 152 write_invalid.0.43
 ok 153 event_missing.0.43
 ok 154 event_spurious.0.43
 ok 155 get_value.0.42
 # 0.42 PCMD3180 i2c2 Dev2 Ch3 Digi Volume
 ok 156 name.0.42
 ok 157 write_default.0.42
 ok 158 write_valid.0.42
 ok 159 write_invalid.0.42
 ok 160 event_missing.0.42
 ok 161 event_spurious.0.42
 ok 162 get_value.0.41
 # 0.41 PCMD3180 i2c2 Dev2 Ch2 Digi Volume
 ok 163 name.0.41
 ok 164 write_default.0.41
 ok 165 write_valid.0.41
 ok 166 write_invalid.0.41
 ok 167 event_missing.0.41
 ok 168 event_spurious.0.41
 ok 169 get_value.0.40
 # 0.40 PCMD3180 i2c2 Dev2 Ch1 Digi Volume
 ok 170 name.0.40
 ok 171 write_default.0.40
 ok 172 write_valid.0.40
 ok 173 write_invalid.0.40
 ok 174 event_missing.0.40
 ok 175 event_spurious.0.40
 ok 176 get_value.0.39
 # 0.39 PCMD3180 i2c2 Dev2 Ch8 Fine Volume
 ok 177 name.0.39
 ok 178 write_default.0.39
 ok 179 write_valid.0.39
 ok 180 write_invalid.0.39
 ok 181 event_missing.0.39
 ok 182 event_spurious.0.39
 ok 183 get_value.0.38
 # 0.38 PCMD3180 i2c2 Dev2 Ch7 Fine Volume
 ok 184 name.0.38
 ok 185 write_default.0.38
 ok 186 write_valid.0.38
 ok 187 write_invalid.0.38
 ok 188 event_missing.0.38
 ok 189 event_spurious.0.38
 ok 190 get_value.0.37
 # 0.37 PCMD3180 i2c2 Dev2 Ch6 Fine Volume
 ok 191 name.0.37
 ok 192 write_default.0.37
 ok 193 write_valid.0.37
 ok 194 write_invalid.0.37
 ok 195 event_missing.0.37
 ok 196 event_spurious.0.37
 ok 197 get_value.0.36
 # 0.36 PCMD3180 i2c2 Dev2 Ch5 Fine Volume
 ok 198 name.0.36
 ok 199 write_default.0.36
 ok 200 write_valid.0.36
 ok 201 write_invalid.0.36
 ok 202 event_missing.0.36
 ok 203 event_spurious.0.36
 ok 204 get_value.0.35
 # 0.35 PCMD3180 i2c2 Dev2 Ch4 Fine Volume
 ok 205 name.0.35
 ok 206 write_default.0.35
 ok 207 write_valid.0.35
 ok 208 write_invalid.0.35
 ok 209 event_missing.0.35
 ok 210 event_spurious.0.35
 ok 211 get_value.0.34
 # 0.34 PCMD3180 i2c2 Dev2 Ch3 Fine Volume
 ok 212 name.0.34
 ok 213 write_default.0.34
 ok 214 write_valid.0.34
 ok 215 write_invalid.0.34
 ok 216 event_missing.0.34
 ok 217 event_spurious.0.34
 ok 218 get_value.0.33
 # 0.33 PCMD3180 i2c2 Dev2 Ch2 Fine Volume
 ok 219 name.0.33
 ok 220 write_default.0.33
 ok 221 write_valid.0.33
 ok 222 write_invalid.0.33
 ok 223 event_missing.0.33
 ok 224 event_spurious.0.33
 ok 225 get_value.0.32
 # 0.32 PCMD3180 i2c2 Dev2 Ch1 Fine Volume
 ok 226 name.0.32
 ok 227 write_default.0.32
 ok 228 write_valid.0.32
 ok 229 write_invalid.0.32
 ok 230 event_missing.0.32
 ok 231 event_spurious.0.32
 ok 232 get_value.0.31
 # 0.31 PCMD3180 i2c2 Dev1 Ch8 Digi Volume
 ok 233 name.0.31
 ok 234 write_default.0.31
 ok 235 write_valid.0.31
 ok 236 write_invalid.0.31
 ok 237 event_missing.0.31
 ok 238 event_spurious.0.31
 ok 239 get_value.0.30
 # 0.30 PCMD3180 i2c2 Dev1 Ch7 Digi Volume
 ok 240 name.0.30
 ok 241 write_default.0.30
 ok 242 write_valid.0.30
 ok 243 write_invalid.0.30
 ok 244 event_missing.0.30
 ok 245 event_spurious.0.30
 ok 246 get_value.0.29
 # 0.29 PCMD3180 i2c2 Dev1 Ch6 Digi Volume
 ok 247 name.0.29
 ok 248 write_default.0.29
 ok 249 write_valid.0.29
 ok 250 write_invalid.0.29
 ok 251 event_missing.0.29
 ok 252 event_spurious.0.29
 ok 253 get_value.0.28
 # 0.28 PCMD3180 i2c2 Dev1 Ch5 Digi Volume
 ok 254 name.0.28
 ok 255 write_default.0.28
 ok 256 write_valid.0.28
 ok 257 write_invalid.0.28
 ok 258 event_missing.0.28
 ok 259 event_spurious.0.28
 ok 260 get_value.0.27
 # 0.27 PCMD3180 i2c2 Dev1 Ch4 Digi Volume
 ok 261 name.0.27
 ok 262 write_default.0.27
 ok 263 write_valid.0.27
 ok 264 write_invalid.0.27
 ok 265 event_missing.0.27
 ok 266 event_spurious.0.27
 ok 267 get_value.0.26
 # 0.26 PCMD3180 i2c2 Dev1 Ch3 Digi Volume
 ok 268 name.0.26
 ok 269 write_default.0.26
 ok 270 write_valid.0.26
 ok 271 write_invalid.0.26
 ok 272 event_missing.0.26
 ok 273 event_spurious.0.26
 ok 274 get_value.0.25
 # 0.25 PCMD3180 i2c2 Dev1 Ch2 Digi Volume
 ok 275 name.0.25
 ok 276 write_default.0.25
 ok 277 write_valid.0.25
 ok 278 write_invalid.0.25
 ok 279 event_missing.0.25
 ok 280 event_spurious.0.25
 ok 281 get_value.0.24
 # 0.24 PCMD3180 i2c2 Dev1 Ch1 Digi Volume
 ok 282 name.0.24
 ok 283 write_default.0.24
 ok 284 write_valid.0.24
 ok 285 write_invalid.0.24
 ok 286 event_missing.0.24
 ok 287 event_spurious.0.24
 ok 288 get_value.0.23
 # 0.23 PCMD3180 i2c2 Dev1 Ch8 Fine Volume
 ok 289 name.0.23
 ok 290 write_default.0.23
 ok 291 write_valid.0.23
 ok 292 write_invalid.0.23
 ok 293 event_missing.0.23
 ok 294 event_spurious.0.23
 ok 295 get_value.0.22
 # 0.22 PCMD3180 i2c2 Dev1 Ch7 Fine Volume
 ok 296 name.0.22
 ok 297 write_default.0.22
 ok 298 write_valid.0.22
 ok 299 write_invalid.0.22
 ok 300 event_missing.0.22
 ok 301 event_spurious.0.22
 ok 302 get_value.0.21
 # 0.21 PCMD3180 i2c2 Dev1 Ch6 Fine Volume
 ok 303 name.0.21
 ok 304 write_default.0.21
 ok 305 write_valid.0.21
 ok 306 write_invalid.0.21
 ok 307 event_missing.0.21
 ok 308 event_spurious.0.21
 ok 309 get_value.0.20
 # 0.20 PCMD3180 i2c2 Dev1 Ch5 Fine Volume
 ok 310 name.0.20
 ok 311 write_default.0.20
 ok 312 write_valid.0.20
 ok 313 write_invalid.0.20
 ok 314 event_missing.0.20
 ok 315 event_spurious.0.20
 ok 316 get_value.0.19
 # 0.19 PCMD3180 i2c2 Dev1 Ch4 Fine Volume
 ok 317 name.0.19
 ok 318 write_default.0.19
 ok 319 write_valid.0.19
 ok 320 write_invalid.0.19
 ok 321 event_missing.0.19
 ok 322 event_spurious.0.19
 ok 323 get_value.0.18
 # 0.18 PCMD3180 i2c2 Dev1 Ch3 Fine Volume
 ok 324 name.0.18
 ok 325 write_default.0.18
 ok 326 write_valid.0.18
 ok 327 write_invalid.0.18
 ok 328 event_missing.0.18
 ok 329 event_spurious.0.18
 ok 330 get_value.0.17
 # 0.17 PCMD3180 i2c2 Dev1 Ch2 Fine Volume
 ok 331 name.0.17
 ok 332 write_default.0.17
 ok 333 write_valid.0.17
 ok 334 write_invalid.0.17
 ok 335 event_missing.0.17
 ok 336 event_spurious.0.17
 ok 337 get_value.0.16
 # 0.16 PCMD3180 i2c2 Dev1 Ch1 Fine Volume
 ok 338 name.0.16
 ok 339 write_default.0.16
 ok 340 write_valid.0.16
 ok 341 write_invalid.0.16
 ok 342 event_missing.0.16
 ok 343 event_spurious.0.16
 ok 344 get_value.0.15
 # 0.15 PCMD3180 i2c2 Dev0 Ch8 Digi Volume
 ok 345 name.0.15
 ok 346 write_default.0.15
 ok 347 write_valid.0.15
 ok 348 write_invalid.0.15
 ok 349 event_missing.0.15
 ok 350 event_spurious.0.15
 ok 351 get_value.0.14
 # 0.14 PCMD3180 i2c2 Dev0 Ch7 Digi Volume
 ok 352 name.0.14
 ok 353 write_default.0.14
 ok 354 write_valid.0.14
 ok 355 write_invalid.0.14
 ok 356 event_missing.0.14
 ok 357 event_spurious.0.14
 ok 358 get_value.0.13
 # 0.13 PCMD3180 i2c2 Dev0 Ch6 Digi Volume
 ok 359 name.0.13
 ok 360 write_default.0.13
 ok 361 write_valid.0.13
 ok 362 write_invalid.0.13
 ok 363 event_missing.0.13
 ok 364 event_spurious.0.13
 ok 365 get_value.0.12
 # 0.12 PCMD3180 i2c2 Dev0 Ch5 Digi Volume
 ok 366 name.0.12
 ok 367 write_default.0.12
 ok 368 write_valid.0.12
 ok 369 write_invalid.0.12
 ok 370 event_missing.0.12
 ok 371 event_spurious.0.12
 ok 372 get_value.0.11
 # 0.11 PCMD3180 i2c2 Dev0 Ch4 Digi Volume
 ok 373 name.0.11
 ok 374 write_default.0.11
 ok 375 write_valid.0.11
 ok 376 write_invalid.0.11
 ok 377 event_missing.0.11
 ok 378 event_spurious.0.11
 ok 379 get_value.0.10
 # 0.10 PCMD3180 i2c2 Dev0 Ch3 Digi Volume
 ok 380 name.0.10
 ok 381 write_default.0.10
 ok 382 write_valid.0.10
 ok 383 write_invalid.0.10
 ok 384 event_missing.0.10
 ok 385 event_spurious.0.10
 ok 386 get_value.0.9
 # 0.9 PCMD3180 i2c2 Dev0 Ch2 Digi Volume
 ok 387 name.0.9
 ok 388 write_default.0.9
 ok 389 write_valid.0.9
 ok 390 write_invalid.0.9
 ok 391 event_missing.0.9
 ok 392 event_spurious.0.9
 ok 393 get_value.0.8
 # 0.8 PCMD3180 i2c2 Dev0 Ch1 Digi Volume
 ok 394 name.0.8
 ok 395 write_default.0.8
 ok 396 write_valid.0.8
 ok 397 write_invalid.0.8
 ok 398 event_missing.0.8
 ok 399 event_spurious.0.8
 ok 400 get_value.0.7
 # 0.7 PCMD3180 i2c2 Dev0 Ch8 Fine Volume
 ok 401 name.0.7
 ok 402 write_default.0.7
 ok 403 write_valid.0.7
 ok 404 write_invalid.0.7
 ok 405 event_missing.0.7
 ok 406 event_spurious.0.7
 ok 407 get_value.0.6
 # 0.6 PCMD3180 i2c2 Dev0 Ch7 Fine Volume
 ok 408 name.0.6
 ok 409 write_default.0.6
 ok 410 write_valid.0.6
 ok 411 write_invalid.0.6
 ok 412 event_missing.0.6
 ok 413 event_spurious.0.6
 ok 414 get_value.0.5
 # 0.5 PCMD3180 i2c2 Dev0 Ch6 Fine Volume
 ok 415 name.0.5
 ok 416 write_default.0.5
 ok 417 write_valid.0.5
 ok 418 write_invalid.0.5
 ok 419 event_missing.0.5
 ok 420 event_spurious.0.5
 ok 421 get_value.0.4
 # 0.4 PCMD3180 i2c2 Dev0 Ch5 Fine Volume
 ok 422 name.0.4
 ok 423 write_default.0.4
 ok 424 write_valid.0.4
 ok 425 write_invalid.0.4
 ok 426 event_missing.0.4
 ok 427 event_spurious.0.4
 ok 428 get_value.0.3
 # 0.3 PCMD3180 i2c2 Dev0 Ch4 Fine Volume
 ok 429 name.0.3
 ok 430 write_default.0.3
 ok 431 write_valid.0.3
 ok 432 write_invalid.0.3
 ok 433 event_missing.0.3
 ok 434 event_spurious.0.3
 ok 435 get_value.0.2
 # 0.2 PCMD3180 i2c2 Dev0 Ch3 Fine Volume
 ok 436 name.0.2
 ok 437 write_default.0.2
 ok 438 write_valid.0.2
 ok 439 write_invalid.0.2
 ok 440 event_missing.0.2
 ok 441 event_spurious.0.2
 ok 442 get_value.0.1
 # 0.1 PCMD3180 i2c2 Dev0 Ch2 Fine Volume
 ok 443 name.0.1
 ok 444 write_default.0.1
 ok 445 write_valid.0.1
 ok 446 write_invalid.0.1
 ok 447 event_missing.0.1
 ok 448 event_spurious.0.1
 ok 449 get_value.0.0
 # 0.0 PCMD3180 i2c2 Dev0 Ch1 Fine Volume
 ok 450 name.0.0
 ok 451 write_default.0.0
 ok 452 write_valid.0.0
 ok 453 write_invalid.0.0
 ok 454 event_missing.0.0
 ok 455 event_spurious.0.0
 # Totals: pass:455 fail:0 xfail:0 xpass:0 skip:0 error:0
2024-04-22 09:56:30 +09:00
Mark Brown
512622407c
ASoC: dapm: improve debugfs output and introduce
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>:

This patch series improves the tools available to understand and debug
DAPM.
2024-04-22 09:56:22 +09:00
Mark Brown
bd74e9c31f
ASoC: nau8821: Add delay control for ADC
Merge series from Seven Lee <wtli@nuvoton.com>:

Change the original fixed delay to the assignment from the property. It
will make it more flexible to different platforms to avoid pop noise at
the beginning of recording.
2024-04-22 09:56:15 +09:00
Mark Brown
d3f36e78d7
ASoC: Intel: avs: Switch to acpi-nhlt
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

The change is based on rafael/acpi-nhlt [1] immutable branch which
Rafael kindly prepared for me. Without the topmost changes to ACPI/NHLT,
the patches present will fail to compile.

Recent changes for the ACPI tree [2] refactored interfaces of the NHLT
table. Currently we have two implementations - one found in acpi
subsystem (unused) and one in sound/hda/. As NHLT is part of ACPI, idea
is to make the former useful and then switch all users of existing
sound/hda/intel-nhlt.c to this new interface over time and remove the
duplicate afterward.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/?h=acpi-nhlt
[2]: https://lore.kernel.org/linux-acpi/20240319083018.3159716-1-cezary.rojewski@intel.com/
2024-04-22 09:55:47 +09:00
Amadeusz Sławiński
f5d20b253d
ASoC: Intel: avs: Switch to ACPI NHLT
Now that NHLT support in ACPI framework was introduced, migrate avs
driver to new API.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084307.2718881-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:35:13 +09:00
Shenghao Ding
6bb1b70690
ASoc: PCM6240: Add compile item for PCM6240 Family driver
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-4-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:51 +09:00
Shenghao Ding
d537f7b52d
ASoc: PCM6240: Create header file for PCM6240 Family driver code
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-3-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:50 +09:00
Shenghao Ding
1324eafd37
ASoc: PCM6240: Create PCM6240 Family driver code
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-2-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:49 +09:00
Luca Ceresoli
5b1047dcf8
ASoC: dapm: debugfs: show the widget type
To make the widget debugfs files more informative, add a line showing the
widget type string.

Keeping backward compatibility is nice to have being debugfs, and ease of
parsing by both humans and software is also good. To maximize both with a
reasonable effort add a new line without thouching the already complex
format of the first line. The syntax is meant to be a key/value pair.

The existing vizdapm tool continues working after this change, ignoring the
new line.

The new format is:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   widget-type adc
   out  "static" "Capture" "cs42l51.0-004a"
   in  "static" "Left PGA" "cs42l51.0-004a"

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20240416-vizdapm-ng-v1-2-5d33c0b57bc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:58:16 +09:00
Luca Ceresoli
cbd9eed871
ASoC: dapm: debugfs: add component to route lines
debugfs entries for DAPM widgets have the following form:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   out  "static" "Capture"
   in  "static" "Left PGA"

Lines with the "in" and "out" prefixes describe routes from/to other
widgets presenting the path name and the connected widget name.

This is ambiguous in case of cards having multiple widgets with the same
name in different components. For example the STM32MP157A-DK1 board
(arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi) has a "Capture" widget in both
the "cs42l51.0-004a" and the "hdmi-audio-codec.1.auto" components.

Avoid the ambiguity by adding the component name to the "in" and "out"
lines. Add the new field at the end to minimize backward compatibility
issues. The existing vizdapm tool continues working after this change.

The output becomes:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   out  "static" "Capture" "cs42l51.0-004a"
   in  "static" "Left PGA" "cs42l51.0-004a"

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20240416-vizdapm-ng-v1-1-5d33c0b57bc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:58:15 +09:00
Seven Lee
ad8ba241bc
ASoC: nau8821: Remove redundant ADC controls
Remove redundant left/right adc channel enable controls.

Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20240415070649.3496487-4-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:57:10 +09:00
Seven Lee
b37fdd42c0
ASoC: nau8821: Add delay control for ADC
Change the original fixed delay to the assignment from the property.
It will make it more flexible to different platforms to avoid pop
noise at the beginning of recording.

Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20240415070649.3496487-3-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:57:09 +09:00
Srinivas Kandagatla
32ac501957
ASoC: codecs: wsa881x: set clk_stop_mode1 flag
WSA881x codecs do not retain the state while clock is stopped, so mark
this with clk_stop_mode1 flag.

Fixes: a0aab9e140 ("ASoC: codecs: add wsa881x amplifier support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240419140012.91384-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-20 10:03:24 +09:00
Takashi Iwai
f25f17dc5c ALSA: seq: ump: Fix conversion from MIDI2 to MIDI1 UMP messages
The conversion from MIDI2 to MIDI1 UMP messages had a leftover
artifact (superfluous bit shift), and this resulted in the bogus type
check, leading to empty outputs.  Let's fix it.

Fixes: e9e02819a9 ("ALSA: seq: Automatic conversion of UMP events")
Cc: <stable@vger.kernel.org>
Link: https://github.com/alsa-project/alsa-utils/issues/262
Message-ID: <20240419100442.14806-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-19 12:07:14 +02:00
Ai Chao
7ee5faad0f ALSA: hda/realtek - Enable audio jacks of Haier Boyue G42 with ALC269VC
The Haier Boyue G42 with ALC269VC cannot detect the MIC of headset,
the line out and internal speaker until
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Message-ID: <20240419082159.476879-1-aichao@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-19 12:00:57 +02:00
Cezary Rojewski
84049e2db5
ASoC: Intel: avs: Remove unused IRQ-related code
Most IRQ-related code is duplicated in the driver. Switch to the new
implementation and remove unused members.

While the change is non-trivial, from functional perspective status quo
is achieved.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084857.2719593-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 18:57:06 +09:00
Cezary Rojewski
7ce6ceeb77
ASoC: Intel: avs: New IRQ handling implementation
The existing code can be both improved and simplified. To make this
change easier to manage, first add new implementation and then remove
deadcode in a separate patch.

Simplification achieved with:
- reduce the amount of resources requested by the driver i.e.: IPC and
  CLDMA request_irq() merged into one
- reduce the number of DSP ops from 2 to 1:
  irq_handler/thread() vs dsp_interrupt()
- drop ambiguity around CLDMA interrupt, let skl.c handle that
  explicitly as it is the only user

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084857.2719593-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 18:57:05 +09:00
Joao Paulo Goncalves
d18ca8635d
ASoC: ti: davinci-mcasp: Fix race condition during probe
When using davinci-mcasp as CPU DAI with simple-card, there are some
conditions that cause simple-card to finish registering a sound card before
davinci-mcasp finishes registering all sound components. This creates a
non-working sound card from userspace with no problem indication apart
from not being able to play/record audio on a PCM stream. The issue
arises during simultaneous probe execution of both drivers. Specifically,
the simple-card driver, awaiting a CPU DAI, proceeds as soon as
davinci-mcasp registers its DAI. However, this process can lead to the
client mutex lock (client_mutex in soc-core.c) being held or davinci-mcasp
being preempted before PCM DMA registration on davinci-mcasp finishes.
This situation occurs when the probes of both drivers run concurrently.
Below is the code path for this condition. To solve the issue, defer
davinci-mcasp CPU DAI registration to the last step in the audio part of
it. This way, simple-card CPU DAI parsing will be deferred until all
audio components are registered.

Fail Code Path:

simple-card.c: probe starts
simple-card.c: simple_dai_link_of: simple_parse_node(..,cpu,..) returns EPROBE_DEFER, no CPU DAI yet
davinci-mcasp.c: probe starts
davinci-mcasp.c: devm_snd_soc_register_component() register CPU DAI
simple-card.c: probes again, finish CPU DAI parsing and call devm_snd_soc_register_card()
simple-card.c: finish probe
davinci-mcasp.c: *dma_pcm_platform_register() register PCM  DMA
davinci-mcasp.c: probe finish

Cc: stable@vger.kernel.org
Fixes: 9fbd58cf4a ("ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller")
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240417184138.1104774-1-jpaulo.silvagoncalves@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 09:42:04 +09:00
Amadeusz Sławiński
4cbb5050bf
ASoC: Intel: avs: Set name of control as in topology
When creating controls attached to widgets, there are a lot of rules if
they get their name prefixed with widget name or not. Due to that
controls ended up with weirdly looking names like "ssp0_fe DSP Volume",
while topology set it to "DSP Volume".

Fix this by setting no_wname_in_kcontrol_name to true in avs topology
widgets which disables unwanted behaviour.

Fixes: be2b81b519 ("ASoC: Intel: avs: Parse control tuples")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240418142621.2487478-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 09:42:03 +09:00
Mauro Carvalho Chehab
7caf3daaaf ALSA: hda/realtek: Add quirks for Huawei Matebook D14 NBLB-WAX9N
The headset mic requires a fixup to be properly detected/used.

As a reference, this specific model from 2021 reports
the following devices:
	https://alsa-project.org/db/?f=1a5ddeb0b151db8fe051407f5bb1c075b7dd3e4a

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: <stable@vger.kernel.org>
Message-ID: <b92a9e49fb504eec8416bcc6882a52de89450102.1713370457.git.mchehab@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-18 09:32:00 +02:00
Huayu Zhang
dca5f4dfa9 ALSA: hda/realtek: Fix volumn control of ThinkBook 16P Gen4
change HDA & AMP configuration from ALC287_FIXUP_CS35L41_I2C_2 to
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD for ThinkBook 16P Gen4
models to fix volumn control issue (cannot fully mute).

Signed-off-by: Huayu Zhang <zhanghuayu1233@qq.com>
Fixes: 6214e24cae ("ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops")
Message-ID: <tencent_37EB880C5E5BD99D21C16B288115C4545F06@qq.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-18 08:48:01 +02:00
Vitalii Torshyn
0672b01732 ALSA: hda/realtek: Fixes for Asus GU605M and GA403U sound
Added the correct pin table for Asus GU605M and GA403U, enabling all
speakers to be controlled with the master.
Updated quirks for GU605M and GA403U by including the pin table patch
in the chain.

Co-developed-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Vitalii Torshyn <vitaly.torshyn@gmail.com>
Message-ID: <20240411125803.18539-1-vitaly.torshyn@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-18 08:46:40 +02:00
Shenghao Ding
f74ab0c5e5 ALSA: hda/tas2781: Add new vendor_id and subsystem_id to support ThinkPad ICE-1
Add new vendor_id and subsystem_id to support new Lenovo laptop
ThinkPad ICE-1

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Cc: <stable@vger.kernel.org>
Message-ID: <20240411091823.1644-1-shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-18 08:40:26 +02:00
John Watts
9be51470d5
ASoC: sunxi: sun4i-i2s: Fix pcm_formats type specification
pcm_formats should be a u64 as it is a SNDRV_PCM_FMTBIT_* not a
SNDRV_PCM_FORMAT_*.

Also fix a small grammar error while we're here.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404170103.ySYwieqi-lkp@intel.com/
Signed-off-by: John Watts <contact@jookia.org>
Link: https://lore.kernel.org/r/20240417-sunxi_s32_fix-v1-1-d82e451565c0@jookia.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-17 23:01:06 +09:00
Peter Ujfalusi
9a039db927
ASoC: SOF: Core: Handle error returned by sof_select_ipc_and_paths
The patch which fixed the missing remove_late() calls missed a case
when sof_select_ipc_and_paths() could return with error and in this
case sof_init_environment() would just return with 0.

Do not ignore the error code returned by sof_select_ipc_and_paths().

Fixes: 90f8917e7a ("ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240417075804.10829-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-17 23:01:01 +09:00
AngeloGioacchino Del Regno
6ed619b348
ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine drivers
Copy the few differences from mt8186-mt6166-da7219-max98357 in the
mt8186-mt6366-rt1019-rt5682s driver to greatly reduce code duplication;
since now the driver is meant to support MT8186 with the MT6366 PMIC
codec and various combinations of I2S codecs, rename the driver to
mt8186-mt6366 for consistency with MT8195 and MT8188, and rename
the configuration option to SND_SOC_MT8186_MT6366.

Since right now there is no machine using the da7219-max98357 yet, the
snd_soc_dapm_route array was omitted as it's now possible to specify
the audio routing in device trees instead.

While at it, also add the missing sentinel comment to the last entry
of the of_device_id array.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-14-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:04 +09:00
AngeloGioacchino Del Regno
1d2a6b3b51
ASoC: mediatek: Use common mtk_afe_pcm_platform with common probe cb
Since the mtk-afe-platform-driver generic mtk_afe_pcm_platform now has
a common .probe() callback, there is no reason to keep duplicating this
function over and over in the SoC specific AFE-PCM drivers: switch over
to register with the common bits instead.

Note that MT8186 was left out of this because it is registering some
extra sinegen controls in the AFE-PCM probe callback and needs extra
cleanups to be able to use the common bits.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-13-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:03 +09:00
AngeloGioacchino Del Regno
9d9b182876
ASoC: mediatek: Add common mtk_afe_component_probe callback
Multiple MediaTek AFE PCM component drivers are using their own .probe()
callback, but most of those are simply duplicated functions as they are
doing exactly the same thing over and over.

Add a common probe callback for this component to reduce duplication.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-12-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:02 +09:00
AngeloGioacchino Del Regno
f103ce4ff6
ASoC: mediatek: mt8186-rt1019: Migrate to the common mtk_soundcard_startup
Add a const mtk_pcm_constraints_data struct array with all of the
(again, constant) constraints for all of the supported usecases,
remove the duplicated functions and call mtk_soundcard_startup()
instead in all of the .startup() callbacks.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-11-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:01 +09:00
AngeloGioacchino Del Regno
94142cc1ff
ASoC: mediatek: mt8192: Migrate to the common mtk_soundcard_startup
Add a const mtk_pcm_constraints_data struct array with all of the
(again, constant) constraints for all of the supported usecases,
remove the duplicated functions and call mtk_soundcard_startup()
instead in all of the .startup() callbacks.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-10-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:01 +09:00
AngeloGioacchino Del Regno
386fe4ceaf
ASoC: mediatek: mt8195: Migrate to the common mtk_soundcard_startup
Add a const mtk_pcm_constraints_data struct array with all of the
(again, constant) constraints for all of the supported usecases,
remove the duplicated functions and call mtk_soundcard_startup()
instead in all of the .startup() callbacks.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-9-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 20:00:00 +09:00
AngeloGioacchino Del Regno
fe071237de
ASoC: mediatek: Add common snd_soc_ops .startup() callback
MediaTek platforms are typically setting PCM rate and channels
constraints for playback, capture and HDMI/DisplayPort playback:
commonize the startup callback by adding the PCM constraints data
to the mtk_platform_card_data structure and by reusing the common
mtk_soundcard_startup() function for all of them by getting back
the parameters from the aforementioned struct.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-8-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:59 +09:00
AngeloGioacchino Del Regno
44a53c8ec9
ASoC: mediatek: mt8186: Migrate to mtk_soundcard_common_probe
Add mtk_soundcard_pdata platform data for the MediaTek common sound card
probe mechanism, including a driver/soc-specific probe extension (used
for bits that cannot be commonized  hence specific to this driver), and
change the probe function to mtk_soundcard_common_probe.

This is also adding the possibility of specifying the links and routing
with the audio-routing property and (x)-dai-link nodes in device trees
to stop hardcoding machine specific links in the card driver assupported
by the common probe function, but support for legacy device trees is
retained with a legacy_probe function, which is used only in case the
new properties are not found.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-7-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:58 +09:00
AngeloGioacchino Del Regno
2d72cbb563
ASoC: mediatek: mt8192: Migrate to mtk_soundcard_common_probe
Add mtk_soundcard_pdata platform data for the MediaTek common sound card
probe mechanism, including a driver/soc-specific probe extension (used
for bits that cannot be commonized  hence specific to this driver), and
change the probe function to mtk_soundcard_common_probe.

This is also adding the possibility of specifying the links and routing
with the audio-routing property and (x)-dai-link nodes in device trees
to stop hardcoding machine specific links in the card driver assupported
by the common probe function, but support for legacy device trees is
retained with a legacy_probe function, which is used only in case the
new properties are not found.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:57 +09:00
AngeloGioacchino Del Regno
6718e1ed93
ASoC: mediatek: mt8195: Migrate to mtk_soundcard_common_probe
Add mtk_soundcard_pdata platform data for the MediaTek common sound card
probe mechanism, including a driver/soc-specific probe extension (used
for bits that cannot be commonized  hence specific to this driver), and
change the probe function to mtk_soundcard_common_probe.

This is also adding the possibility of specifying the links and routing
with the audio-routing property and (x)-dai-link nodes in device trees
to stop hardcoding machine specific links in the card driver assupported
by the common probe function, but support for legacy device trees is
retained with a legacy_probe function, which is used only in case the
new properties are not found.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:56 +09:00
AngeloGioacchino Del Regno
aad45b8aa9
ASoC: mediatek: mt8188: Migrate to mtk_soundcard_common_probe
Add mtk_soundcard_pdata platform data for the MediaTek common sound card
probe mechanism, including a driver/soc-specific probe extension (used
for bits that cannot be commonized  hence specific to this driver), and
change the probe function to mtk_soundcard_common_probe.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:56 +09:00
AngeloGioacchino Del Regno
f8782f776d
ASoC: mediatek: common: Constify struct mtk_sof_priv
Apart from a dai_link_list variable, the mtk_sof_priv currently holds
data that never gets modified during runtime.

Constify the mtk_sof_priv structure and move the SOF dai_link_list as
sof_dai_link_list in struct mtk_soc_card_data, which is a structure
that already holds the card's machine specific, runtime modified data.

This allows to safely pass the mtk_sof_priv structure as platform data
for the commonized card probe mechanism.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:55 +09:00
AngeloGioacchino Del Regno
bce93a1625
ASoC: mediatek: Add common machine soundcard driver probe mechanism
Add a common machine soundcard driver probe function that supports both
DSP and AFE-direct usecases and also provides a hook for legacy machine
soundcard driver probe mechanisms.

Note that the hook is there because, even for legacy probe, a lot of the
actual code can still be commonized, hence still reducing duplication
for the legacy devicetree retrocompatibility cases.

This common probe function deprecates all of the inconsistent previous
probe mechanisms and aims to settle all of the MediaTek card drivers on
consistent and common devicetree properties describing wanted DAIs,
device specific DAI configuration and DAI links to codecs found on
each device/board.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 19:59:54 +09:00
Shengjiu Wang
51f67862ea
ASoC: fsl-asoc-card: add wm8904 codec support
wm8904 codec is used on i.MX95 Toradex board

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1713165456-3494-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 08:45:05 +09:00
Jack Yu
cebfbc89ae
ASoC: rt715: add vendor clear control register
Add vendor clear control register in readable register's
callback function. This prevents an access failure reported
in Intel CI tests.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Closes: https://github.com/thesofproject/linux/issues/4860
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/6a103ce9134d49d8b3941172c87a7bd4@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-16 08:44:59 +09:00
John Watts
863f94ac5f
ASoC: sunxi: sun4i-i2s: Support 32-bit audio formats
The I2S cores used in the H3 onwards support 32-bit sample rates.
Support these by adding a per-variant PCM format list.

Signed-off-by: John Watts <contact@jookia.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240403-sunxi_s32-v2-1-29ebf6ad590a@jookia.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15 19:57:00 +09:00
Krzysztof Kozlowski
dd8c3473bb
ASoC: amd: acp-da7219-max98357a: Constify regulator_ops
Neither core nor the driver modifes 'struct regulator_ops', so it can be
const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240414164703.239851-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15 10:17:20 +09:00
Krzysztof Kozlowski
9d85ec4e91
ASoC: samsung: i2s: Drop unneeded MODULE_ALIAS
The ID table already has respective entry and MODULE_DEVICE_TABLE and
creates proper alias for platform driver.  Having another MODULE_ALIAS
causes the alias to be duplicated.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240414154839.126852-2-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15 10:17:17 +09:00
Krzysztof Kozlowski
615169c727
ASoC: wcd934x: Drop unneeded MODULE_ALIAS
The ID table already has respective entry and MODULE_DEVICE_TABLE and
creates proper alias for platform driver.  Having another MODULE_ALIAS
causes the alias to be duplicated.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240414154839.126852-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15 10:17:16 +09:00
end.to.start
c21614d5c0
ASoC: amd: Support microphone from Acer Aspire A315-24P
Add support microphone from Acer Aspire A315-24P and for some other similar devices with such vendor

Signed-off-by: "end.to.start" <end.to.start@mail.ru>
Link: https://lore.kernel.org/r/20240412075533.10214-1-end.to.start@mail.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-15 10:17:15 +09:00
Mark Brown
5f14536b51
ASoC: Intel: updates for 6.10 - part4
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

More cleanups from Brent, notably the removal of the redundant
cml_rt1011_rt5682 machine driver, fixes for SoundWire platforms and
changes to sof_rt5682 to allow for 96+ sampling rates.

For the rest of this kernel cycle, we are still working on SoundWire
updates for MeteorLake (usual missing ACPI signature required for
topology selection and jack detection information). We'll provide
those patches as soon as they are reviewed/validated.
2024-04-15 10:14:58 +09:00
Dan Carpenter
a8cad4a4e4
ASoC: soc-card: soc-card-test: Fix some error handling in init()
There are two issues here:
1) The get_device() needs a matching put_device() on error paths.
2) The "if (!ret)" was supposed to be "if (ret)".

I re-arranged the code a bit to do the allocation before the
get_device().

Fixes: ef7784e41d ("ASoC: soc-card: Add KUnit test case for snd_soc_card_get_kcontrol")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/450dd21a-b24b-48ba-9aa4-c02e4617852f@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:39 +09:00
Bard Liao
dcc2cd8000
ASoC: Intel: sof_rt5682: use RT5682S_PLL1 if needed
When 96KHz sample rate is used, and MCLK is 24.576MHz, we will need
pll_in = 24576000 and pll_out = 49152000 which is not supported by
RT5682S_PLL2. Use RT5682S_PLL1 in this case.
We don't test sample rate because RT5682S_PLL2 doesn't support 24.576MHz
input and in the MCLK = 24.576MHz, sample rate = 48KHz case, i.e.
pll_in == pll_out, PLL will not be used at all.

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/20240411220347.131267-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:32 +09:00
Brent Lu
ca571e5a2e
ASoC: Intel: cml_rt1011_rt5682: delete driver
Delete this driver and use sof_rt5682 machine driver instead.

Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:31 +09:00
Brent Lu
6136d879f3
ASoC: Intel: sof_rt5682: support ALC1011 on cml boards
For cml boards, ALC1011 speaker amplifier is supported by machine
driver cml_rt1011_rt5682. Use same driver name for backward
compatibility with existing devices on market.

Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:30 +09:00
Brent Lu
551fb5593c
ASoC: Intel: sof_realtek_common: support 4xALC1011 amplifier
Add support for boards with four ALC1011 amplifiers. Configuration is
copied from cml_rt1011_rt5682 machine driver for backward
compatibility with existing cml devices.

Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:29 +09:00
Brent Lu
fe18a4be97
ASoC: Intel: sof_da7219: add mtl_da7219_def for mtl boards
Add the board config mtl_da7219_def to da7219 machine driver for all
mtl boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP0, and BT offload on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:28 +09:00
Brent Lu
c3d1818f5e
ASoC: Intel: sof_da7219: mach cleanup for rpl boards
Add a common entry in enumeration table for all da7219 boards
with/without speaker amplifier. All other rpl_da7219_def entries
become redundant so get removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:27 +09:00
Brent Lu
36a621070b
ASoC: Intel: sof_da7219: mach cleanup for adl boards
Add a common entry in enumeration table for all da7219 boards
with/without speaker amplifier. All other adl_da7219_def entries
become redundant so get removed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:27 +09:00
Pierre-Louis Bossart
744866d28f
ASoC: Intel: sof_sdw: remove FOUR_SPEAKER quirks
This patch removes a confusion between speakers and amplifiers.

The existing code keeps track of the number of amplifiers and reports
it in the 'cfg-amp' component string.

The number of speakers is defined with quirks, but those quirks are
not consistently added: in the MeteorLake case, none of the supported
platforms used such a quirk, and UCM does not use the values reported
anyways. The notion of 'FOUR_SPEAKERS' is also obsolete now with some
platforms having more than four speakers.

Let's just remove all this and only report the number of amplifiers.

Signed-off-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/20240411220347.131267-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:26 +09:00
Pierre-Louis Bossart
b10cb955c6
ASoC: Intel: sof_sdw: add quirk for Dell SKU 0C0F
The JD1 jack detection doesn't seem to work, use JD2.
Also use the 4 speaker configuration.

Link: https://github.com/thesofproject/linux/issues/4900
Signed-off-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/20240411220347.131267-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:25 +09:00
Pierre-Louis Bossart
4fee07fbf4
ASoC: Intel: sof_sdw: add JD2 quirk for HP Omen 14
The default JD1 does not seem to work, use JD2 instead.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:24 +09:00
Pierre-Louis Bossart
0f8edb15fb
ASoC: Intel: soc-acpi: add support for HP Omen14 SoundWire configuration
This platform has an RT711-sdca on link0 and RT1316 on link3

Closes: https://github.com/thesofproject/linux/issues/4880
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240411220347.131267-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:23 +09:00
Bard Liao
7fda0efaa5
ASoC: Intel: sof_sdw: add missing sof_sdw_rt_amp_init for Realtek multi-function codecs
We do need "info->amp_num++;" for the speaker dai.

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/20240411220347.131267-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-14 16:54:23 +09:00
Stefan Binding
eefb831d2e
ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config
Currently, all ASoC systems are set to use VPMON for DSP1RX5_SRC,
however, this is required only for internal boost systems.
External boost systems require VBSTMON instead of VPMON to be the
input to DSP1RX5_SRC.
Shared Boost Active acts like Internal boost (requires VPMON).
Shared Boost Passive acts like External boost (requires VBSTMON)
All systems require DSP1RX6_SRC to be set to VBSTMON.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240411142648.650921-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-11 17:06:40 +01:00
Colin Ian King
1d165c5a1c
ASoC: codecs: tas2780: remove redundant assignments to variable ret
Variable ret is being assigned a value that is never read in a couple
of places. The variable is being re-assigned later on. The assignments
are redundant and can be removed.

Cleans up clang scan build warning:
sound/soc/codecs/tas2780.c:84:2: warning: Value stored to 'ret' is
never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://msgid.link/r/20240411083332.304887-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-11 13:30:12 +01:00
Richard Fitzgerald
28d31ffac3
ASoC: cs35l56: Include array_size.h
Explicitly #include array_size.h for the source files that use
ARRAY_SIZE().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240410160833.20837-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-10 17:35:59 +01:00
Richard Fitzgerald
4693b12029
ASoC: wm_adsp: Include array_size.h
Explicitly #include array_size.h for the ARRAY_SIZE() macro.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240410161312.22313-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-10 17:35:58 +01:00
Mark Brown
6451246884
ASoC: ti: davinci-i2s: Add features to McBSP
Merge series from Bastien Curutchet <bastien.curutchet@bootlin.com>:

This series aims to add some features to McBSP driver.

Convert bindings from .txt to .yaml.
Add possibility to use an external clock as sample rate generator's
input.
Add handling of new formats (TDM, S24_LE, BP_FC).
Enable the detection of unexpected frame pulses.
Set the clock free-running mode according to SND_SOC_DAIFMT_[GATED/CONT]
configuration in DAI format.
Add ti,T1-framing[tx/rx] properties in DT. They allow to set the data
delay to two bit-clock periods.

This has been tested on a platform designed off of the DAVINCI/OMAP-L138
connected to 3 daisy-chained AD7767. An external clock drives the
sample rate generator through the CLKS pin.
The hardware I have only allowed me to test acquisition side of McBSP.
It is connected to a 6 channels TDM and acts as Bit clock provider and
Frame clock consumer.
2024-04-09 23:27:01 +01:00
Mark Brown
e2ff3bd86d
ASoC: SOF: Intel: Add fw_regs area to debugfs map for
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The beginning of the first SRAM window contains various fw registers and
additional information which can be very beneficial to read to gather
information on the current states to debug issues.
2024-04-09 23:26:49 +01:00
Mark Brown
2e411e939d
ASoC: cs35l56: Fixes to handling of ASP1 config
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This chain fixes some problems with some previous patches for handling
the ASP1 config registers. The root of the problem is that the ownership
of these registers can be either with the firmware or the driver, and that
the chip has to be soft-reset after downloading the firmware.

This chain adds and uses a regmap_read_bypassed() function so that the
driver can leave the regmap in cache-only until the chip has rebooted,
but still poll a register to detect when the chip has rebooted.

Richard Fitzgerald (4):
  regmap: Add regmap_read_bypassed()
  ALSA: hda: cs35l56: Exit cache-only after
    cs35l56_wait_for_firmware_boot()
  ASoC: cs35l56: Fix unintended bus access while resetting amp
  ASoC: cs35l56: Prevent overwriting firmware ASP config

 drivers/base/regmap/regmap.c      | 37 ++++++++++++++
 include/linux/regmap.h            |  8 +++
 include/sound/cs35l56.h           |  2 +
 sound/pci/hda/cs35l56_hda.c       |  4 ++
 sound/soc/codecs/cs35l56-sdw.c    |  2 -
 sound/soc/codecs/cs35l56-shared.c | 83 ++++++++++++++++++++-----------
 sound/soc/codecs/cs35l56.c        | 26 +++++++++-
 7 files changed, 130 insertions(+), 32 deletions(-)

--
2.39.2
2024-04-09 23:26:37 +01:00
Mark Brown
f23e8f3ad3
ASoC: SOF: ipc4-pcm: Do not reset ChainDMA if it is
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The current code will reset the ChainDMA on release unconditionally which
can result the following error when the CHainDMA is not allocated:

ipc tx      : 0xe040000|0x0: GLB_CHAIN_DMA
ipc tx reply: 0x2e000007|0x0: GLB_CHAIN_DMA
FW reported error: 7 - Unsupported operation requested
ipc error for msg 0xe040000|0x0
sof_pcm_stream_free: pcm_ops hw_free failed -22

Background:
Pulseaudio and Pipewire on startup opens all available streams and
closes them without triggering a start (after probing it's capabilities).
2024-04-09 23:26:25 +01:00
Mark Brown
a93830a9e0
ASoC: SOF: misc fixes
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

We somehow missed the default path for DSP libraries for LNL, and need
to restrict support for D0i3 w/ IPC4. Also add debugfs support for
firmware profile information so that sof-test scripts can show what is
being tested.
2024-04-09 23:26:14 +01:00
Dragan Simic
f78bf2c933
ASoC: pcm: perform power-down delay checks a bit faster
When checking whether the power-down delay should be ignored for a specific
PCM runtime, there's no need to keep going through all DAI link components
after any of them is found to be configured to use the power-down delay.

While there, fix a small typo in one of the comment blocks.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://msgid.link/r/90ae761a5b99640ece48363a7099ac2cf402bd37.1712684592.git.dsimic@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 20:08:07 +01:00
Jack Yu
140e0762ca
ASoC: rt722-sdca: add headset microphone vrefo setting
Add vrefo settings to fix jd and headset mic recording issue.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/727219ed45d3485ba8f4646700aaa8a8@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 19:21:39 +01:00
Jack Yu
cb9946971d
ASoC: rt722-sdca: modify channel number to support 4 channels
Channel numbers of dmic supports 4 channels, modify channels_max
regarding to this issue.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/6a9b1d1fb2ea4f04b2157799f04053b1@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 19:21:38 +01:00
Vijendar Mukunda
56437a561f
ASoC: amd: fix for soundwire build dependencies for legacy stack
The SND_SOC_AMD_SOUNDWIRE Kconfig symbol has build dependency on
SOUNDWIRE_AMD. It gets it wrong for a configuration involving
SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE=y,SND_SOC_AMD_PS=y and SOUNDWIRE_AMD=m,
which results in a link failure:

ld: vmlinux.o: in function `amd_sdw_probe':
>> sound/soc/amd/ps/pci-ps.c:271:(.text+0x1d51eff):
	undefined reference to `sdw_amd_probe'
ld: vmlinux.o: in function `acp63_sdw_machine_select':
>> sound/soc/amd/ps/pci-ps.c:294:(.text+0x1d525d5):
	undefined reference to `sdw_amd_get_slave_info'
ld: vmlinux.o: in function `amd_sdw_exit':
>> sound/soc/amd/ps/pci-ps.c:280:(.text+0x1d538ce):
	undefined reference to `sdw_amd_exit'

Add a top level check config that forbids any of the AMD ACP drivers
with version >= 6.3 from being built-in with CONFIG_SOUNDWIRE_AMD=m.
Move SND_AMD_ACP_CONFIG common dependency config to
SND_SOC_AMD_ACP63_TOPLEVEL config.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404061257.khJml82D-lkp@intel.com/
Fixes: a806793f23 ("ASoC: amd: simplify soundwire dependencies for legacy stack")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240408180229.3287220-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 18:14:18 +01:00
Bastien Curutchet
08e02fa484
ASoC: ti: davinci-i2s: Add T1 framing support
McBSP's data delay can be configured from 0 to 2 bit clock periods. 0 is
used for DSP_B format, 1 is used for DSP_A format, 2 is unused.

A data delay of 2 bit clock periods can be used to interface to
'T1 framing' devices where data stream is preceded by a 'framing bit'. On
transmission, McBSP inserts a blank period (high-impedance period)
before the first data bit to leave an opportunity for other devices to
set this 'framing bit'. On reception, McBSP discards the 'framing bit'
that precedes the data stream.

Add support for the 'framing bit' according to the
'ti,T1-framing-[tx/rx]' device-tree properties. If a flag is present,
the data delay is set to 2 bit clock periods regardless of the selected
DAI format.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-14-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:43 +01:00
Bastien Curutchet
92e7bb2b6a
ASoC: ti: davinci-i2s: Add S24_LE to supported formats
S24_LE is supported by McBSP but not by the driver.

Add S24_LE to driver's supported formats. Using it enables the sign
extension in DRR (Data Receive Register). The other formats are kept
with the zero extension in DRR.

Remove data_type table as it is no longer used.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-12-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:41 +01:00
Bastien Curutchet
091b440ffd
ASoC: ti: davinci-i2s: Link free-run mode to SND_SOC_DAIFMT_[GATED/CONT]
McBSP has free-running mode where serial clocks continue to run during
emulation halts. This mode is always enabled by the driver.

Set free-running mode when SND_SOC_DAIFMT_CONT is selected by DAI
format, unset it when SND_SOC_DAIFMT_GATED is selected.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-11-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:41 +01:00
Bastien Curutchet
94d57c541d
ASoC: ti: davinci-i2s: Enable unexpected frame pulses detection
McBSP can generate a SYNCERR when unexpected frame pulses are
detected. The driver always disables this feature and ignore the
unexpected frame pulses.

Enable the generation of SYNCERR by the McBSP. Unexpected frame
pulses are not ignored anymore.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-10-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:40 +01:00
Bastien Curutchet
eff21f5f8e
ASoC: ti: davinci-i2s: Add handling of BP_FC format
McBSP is able to drive bit clock and consume frame clock but BP_FC
format is not handled by McBSP driver.

Add BP_FC format support.
When BP_FC is selected:
  - CLKX and CLKR are configured as outputs
  - The sample rate generator is configured to be able to provide bit
    clock.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-9-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:39 +01:00
Bastien Curutchet
37e313cda3
ASoC: ti: davinci-i2s: Add TDM support
TDM is not supported by the McBSP driver. The McBSP datasheet does not
name explicitly TDM as a supported format but it is possible to configure
the McBSP to do TDM if all slots are used by McBSP.

Add TDM support. It uses single-phase frame. Slot width is used to
compute the McBSP's word length.

Implement the set_tdm_slot() hook of snd_soc_dai_ops struct. It only
supports TDM if all slots are used by McBSP.

The snd_soc_dai_driver's channels_max is updated from 2 to 128.

This was tested with BP_FC format on a platform designed off of
DAVINCI/OMAP_L138. A check is done in davinci_i2s_set_dai_fmt() to
prevent TDM to be used with BC_FC and BC_FP formats.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-8-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:38 +01:00
Bastien Curutchet
7dd7a6d264
ASoC: ti: davinci-i2s: Delete unnecessary assignment
In davinci_i2s_hw_params(), mcbsp_word_length is set twice to
asp_word_length[fmt].

Remove second unnecessary assignment.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-7-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:37 +01:00
Bastien Curutchet
714ffb8d36
ASoC: ti: davinci-i2s: Use external clock to drive sample rate generator
McBSP's internal sample rate generator can be programed to be driven by
its internal clock or by an external clock source located on CLKS pin.
The external clock source case is not handled by the driver.

Handle an optional clock related to this external clock source. If
present, the driver uses the clock located on CLKS pin as input for the
sample rate generator. Thus, the external clock rate is used to compute
divisors. If this optional clock is not present, the sample rate
generator is driven by the McBSP's functional clock.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-6-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:36 +01:00
Bastien Curutchet
6b1517b30d
ASoC: ti: davinci-i2s: Replace dev_err with dev_err_probe
In probe(), the dev_err() is used for every returned error.

Replace dev_err() with dev_err_probe() where -EPROBE_DEFER can be
returned.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-5-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:35 +01:00
Bastien Curutchet
904fb8f843
ASoC: ti: davinci-i2s: Remove the unused clk_input_pin attribute
The clk_input_pin attribute of davinci_mcbsp_dev struct is not set since
commit 257ade78b6 ("ASoC: davinci-i2s: Convert to use edma-pcm").

Remove the attribute.
Keep the behaviour of the MCBSP_CLKR case as MCBSP_CLKR == 0.
I can't test the BC_FP format so I added back the initial comment that
was removed by commit ec63755337 ("ASoC: DaVinci: Added selection of
clk input pin for McBSP"). This was the last dependency to
linux/platform_data/davinci_asp.h so it is not included anymore.

Remove the enum mcbsp_clk_input_pin from davinci_asp.h as it is not used
anywhere else.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-4-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:58:34 +01:00
Derek Fang
103abab975
ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating
The codec leaves tie combo jack's sleeve/ring2 to floating status
default. It would cause electric noise while connecting the active
speaker jack during boot or shutdown.
This patch requests a gpio to control the additional jack circuit
to tie the contacts to the ground or floating.

Signed-off-by: Derek Fang <derek.fang@realtek.com>

Link: https://msgid.link/r/20240408091057.14165-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:40:48 +01:00
end.to.start
4b9a474c7c
ASoC: acp: Support microphone from device Acer 315-24p
This patch adds microphone detection for the Acer 315-24p, after which a microphone appears on the device and starts working

Signed-off-by: end.to.start <end.to.start@mail.ru>
Link: https://msgid.link/r/20240408152454.45532-1-end.to.start@mail.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:40:47 +01:00
Geert Uytterhoeven
9fd60615ad
ASoC: codecs: Rockchip on-SoC codecs should depend on ARCH_ROCKCHIP
The various Rockchip embedded audio codecs are only present on Rockchip
SoCs.  Hence add dependencies on ARCH_ROCKCHIP, to prevent asking the
user about these drivers when configuring a kernel without Rockchip SoC
support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://msgid.link/r/6cdbaf4afcf4d2059b257f6cb3a8a61bf5e17688.1712676714.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 16:38:42 +01:00
Pierre-Louis Bossart
17f4041244
ASoC: SOF: debug: show firmware/topology prefix/names
The SOF driver has multiple profiles to select firmware/topology
prefix/names depending on the platform and ipc_type, and each of those
fields can be overridden with kernel parameters. This results in some
cases in confusion on what configuration is actually used in a given
test.

We currently log the firmware and topology names in the kernel logs,
but there's been an ask to add the information in debugfs to simplify
test scripts used by developers and CI.

This isn't meant to be a stable ABI used by apps, changes will be
allowed as needed.

Closes: https://github.com/thesofproject/linux/issues/3867
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240408194147.28919-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 14:03:35 +01:00
Ranjani Sridharan
90a2353080
ASoC: SOF: pcm: Restrict DSP D0i3 during S0ix to IPC3
Introduce a new field in struct sof_ipc_pcm_ops that can be used to
restrict DSP D0i3 during S0ix suspend to IPC3. With IPC4, all streams
must be stopped before S0ix suspend.

Reviewed-by: Uday M Bhat <uday.m.bhat@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240408194147.28919-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 14:03:34 +01:00
Pierre-Louis Bossart
305539a25a
ASoC: SOF: Intel: add default firmware library path for LNL
The commit cd6f2a2e63 ("ASoC: SOF: Intel: Set the default firmware
library path for IPC4") added the default_lib_path field for all
platforms, but this was missed when LunarLake was later introduced.

Fixes: 64a63d9914 ("ASoC: SOF: Intel: LNL: Add support for Lunarlake platform")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240408194147.28919-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 14:03:33 +01:00
Peter Ujfalusi
61faefa220
ASoC: SOF: Intel: lnl: Add fw_regs area to debugfs map
Expose the firmware registers via debugfs. it can be of great help while
debugging complex issues.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240409113349.21623-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:21 +01:00
Peter Ujfalusi
d33a369dda
ASoC: SOF: Intel: mtl: Add fw_regs area to debugfs map
Expose the firmware registers via debugfs. it can be of great help while
debugging complex issues.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240409113349.21623-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:20 +01:00
Peter Ujfalusi
25ab9c40e7
ASoC: SOF: Intel: tgl: Add fw_regs area to debugfs map for IPC4
Expose the firmware registers via debugfs. it can be of great help while
debugging complex issues.
The area is only available with IPC4.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240409113349.21623-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:19 +01:00
Peter Ujfalusi
7211814f2a
ASoC: SOF: ipc4-pcm: Do not reset the ChainDMA if it has not been allocated
The ChainDMA operation differs from normal pipelines that it is only
created when the stream started, in fact a PCM using ChainDMA has no
pipelines, modules.
To reset a ChainDMA, it needs to be first allocated in firmware. When
PulseAudio/PipeWire starts, they will probe the PCMs by opening them, check
hw_params and then close the PCM without starting audio.
Unconditionally resetting the ChainDMA can result the following error:

ipc tx      : 0xe040000|0x0: GLB_CHAIN_DMA
ipc tx reply: 0x2e000007|0x0: GLB_CHAIN_DMA
FW reported error: 7 - Unsupported operation requested
ipc error for msg 0xe040000|0x0
sof_pcm_stream_free: pcm_ops hw_free failed -22

Add a new chain_dma_allocated flag to sof_ipc4_pcm_stream_priv to store the
ChainDMA allocation state and use this flag to skip sending the reset if
the ChainDMA is not allocated.

Signed-off-by: Peter 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://msgid.link/r/20240409110036.9411-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:04 +01:00
Peter Ujfalusi
551af3280c
ASoC: SOF: ipc4-pcm: Introduce generic sof_ipc4_pcm_stream_priv
Using the sof_ipc4_timestamp_info struct directly as sps->private data
is too restrictive, add a new generic sof_ipc4_pcm_stream_priv struct
containing the time_info to allow new information to be stored in a
generic way.

Signed-off-by: Peter 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://msgid.link/r/20240409110036.9411-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:03 +01:00
Peter Ujfalusi
36e980050b
ASoC: SOF: ipc4-pcm: Use consistent name for sof_ipc4_timestamp_info pointer
The pointer to sof_ipc4_timestamp_info named most of the time as
'time_info' only to be named as 'stream_info' or 'info' in two function.

Use the consistent name of 'time_info' throughout the file.

Signed-off-by: Peter 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://msgid.link/r/20240409110036.9411-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:02 +01:00
Peter Ujfalusi
965e49cdf8
ASoC: SOF: ipc4-pcm: Use consistent name for snd_sof_pcm_stream pointer
Throughout the file the pointer for snd_sof_pcm_stream is named either
'stream' or (wrongly) 'spcm' which confuses the reader.

Use 'sps' for the pointer name as it is the most common name used in SOF
codebase.

Signed-off-by: Peter 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://msgid.link/r/20240409110036.9411-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 13:24:01 +01:00
Dan Carpenter
9cb83ed19b
ASoC: Intel: sof_rt5682: Fix uninitialized variable in probe
Initialize "is_legacy_cpu" to false to prevent an uninitialized variable
bug.

Fixes: 8efcd48646 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/6e16433f-1897-46a2-b3ee-e177e7d846b8@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 18:33:33 +01:00
Richard Fitzgerald
dfd2ffb373
ASoC: cs35l56: Prevent overwriting firmware ASP config
Only populate the ASP1 config registers in the regmap cache if the
ASP DAI is used. This prevents regcache_sync() from overwriting
these registers with their defaults when the firmware owns
control of these registers.

On a SoundWire system the ASP could be owned by the firmware to
share reference audio with the firmware on other cs35l56. Or it
can be used as a normal codec-codec interface owned by the driver.
The driver must not overwrite the registers if the firmware has
control of them.

The original implementation for this in commit 07f7d6e7a1
("ASoC: cs35l56: Fix for initializing ASP1 mixer registers") was
to still provide defaults for these registers, assuming that if
they were never reconfigured from defaults then regcache_sync()
would not write them out because they are not dirty. Unfortunately
regcache_sync() is not that smart. If the chip has not reset (so
the driver has not called regcache_mark_dirty()) a regcache_sync()
could write out registers that are not dirty.

To avoid accidental overwriting of the ASP registers, they are
removed from the table of defaults and instead are populated with
defaults only if one of the ASP DAI configuration functions is
called. So if the DAI has never been configured, the firmware is
assumed to have ownership of these registers, and the regmap cache
will not contain any entries for them.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 07f7d6e7a1 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
Link: https://msgid.link/r/20240408101803.43183-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 14:10:01 +01:00
Richard Fitzgerald
d4884fd48a
ASoC: cs35l56: Fix unintended bus access while resetting amp
Use the new regmap_read_bypassed() so that the regmap can be left
in cache-only mode while it is booting, but the driver can still
read boot-status and chip-id information during this time.

This fixes race conditions where some writes could be issued to the
silicon while it is still rebooting, before the driver has determined
that the boot is complete.

This is typically prevented by putting regmap into cache-only until the
hardware is ready. But this assumes that the driver does not need to
access device registers to determine when it is "ready". For cs35l56
this involves polling a register and the original implementation relied
on having special handlers to block racing callbacks until dsp_work()
is complete. However, some cases were missed, most notably the ASP DAI
functions.

The regmap_read_bypassed() function allows the fix for this to be
simplified to putting regmap into cache-only during the reset. The
initial boot stages (poll HALO_STATE and read the chip ID) are all done
bypassed. Only when the amp is seen to be booted is the cache-only
revoked.

Changes are:
- cs35l56_system_reset() now leaves the regmap in cache-only status.

- cs35l56_wait_for_firmware_boot() polls using regmap_read_bypassed().

- cs35l56_init() revokes cache-only either via cs35l56_hw_init() or
  when firmware has rebooted after a soft reset.

- cs35l56_hw_init() exits cache-only after it has determined that the
  amp has booted.

- cs35l56_sdw_init() doesn't disable cache-only, since this must be
  deferred to cs35l56_init().

- cs35l56_runtime_resume_common() waits for firmware boot before exiting
  cache-only.

These changes cover three situations where the registers are not
accessible:

1) SoundWire first-time enumeration. The regmap is kept in cache-only
   until the chip is fully booted. The original code had to exit
   cache-only to read chip status in cs35l56_init() and cs35l56_hw_init()
   but this is now deferred to after the firmware has rebooted.

   In this case cs35l56_sdw_probe() leaves regmap in cache-only
   (unchanged behaviour) and cs35l56_hw_init() exits cache-only after the
   firmware is booted and the chip identified.

2) Soft reset during first-time initialization. cs35l56_init() calls
   cs35l56_system_reset(), which puts regmap into cache-only.
   On I2C/SPI cs35l56_init() then flows through to call
   cs35l56_wait_for_firmware_boot() and exit cache-only. On SoundWire
   the re-enumeration will enter cs35l56_init() again, which then drops
   down to call cs35l56_wait_for_firmware_boot() and exit cache-only.

3) Soft reset after firmware download. dsp_work() calls
   cs35l56_system_reset(), which puts regmap into cache-only. After this
   the flow is the same as (2).

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 8a731fd37f ("ASoC: cs35l56: Move utility functions to shared file")
Link: https://msgid.link/r/20240408101803.43183-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 14:10:00 +01:00
Richard Fitzgerald
73580ec607
ALSA: hda: cs35l56: Exit cache-only after cs35l56_wait_for_firmware_boot()
Adds calls to disable regmap cache-only after a successful return from
cs35l56_wait_for_firmware_boot().

This is to prepare for a change in the shared ASoC module that will
leave regmap in cache-only mode after cs35l56_system_reset(). This is
to prevent register accesses going to the hardware while it is
rebooting.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240408101803.43183-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 14:09:59 +01:00
Mohammad Rafi Shaik
5485c3fa96
ASoC: qcom: sc8280xp: Add support for QCM6490 and QCS6490
Add compatibles for sound card on Qualcomm QCM6490 IDP and
QCS6490 RB3Gen2 boards.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://msgid.link/r/20240408042331.403103-3-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 13:39:00 +01:00
Hans de Goede
e50729d742
ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too
The Asus T100TA quirk has been using an exact match on a product-name of
"T100TA" but there are also T100TAM variants with a slightly higher
clocked CPU and a metal backside which need the same quirk.

Sort the existing T100TA (stereo speakers) below the more specific
T100TAF (mono speaker) quirk and switch from exact matching to
substring matching so that the T100TA quirk will also match on
the T100TAM models.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://msgid.link/r/20240407191559.21596-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 13:38:47 +01:00
Sameer Pujar
2e93a29b48
ASoC: tegra: Fix DSPK 16-bit playback
DSPK configuration is wrong for 16-bit playback and this happens because
the client config is always fixed at 24-bit in hw_params(). Fix this by
updating the client config to 16-bit for the respective playback.

Fixes: 327ef64702 ("ASoC: tegra: Add Tegra186 based DSPK driver")
Cc: stable@vger.kernel.org
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://msgid.link/r/20240405104306.551036-1-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 13:38:46 +01:00
Cezary Rojewski
7a1625c171
ASoC: Intel: avs: Fix debug window description
Recent changes addressed PAGE_SIZE ambiguity in 2/3 locations for struct
avs_icl_memwnd2. The unaddressed one causes build errors when
PAGE_SIZE != SZ_4K.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404070100.i3t3Jf7d-lkp@intel.com/
Fixes: 275b583d04 ("ASoC: Intel: avs: ICL-based platforms support")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240408081840.1319431-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-08 13:38:45 +01:00
Shenghao Ding
0b6f0ff01a ALSA: hda/tas2781: correct the register for pow calibrated data
Calibrated data was written into an incorrect register, which cause
speaker protection sometimes malfuctions

Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Cc: <stable@vger.kernel.org>
Message-ID: <20240406132010.341-1-shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-07 08:32:14 +02:00
Vitaly Rodionov
84471d01c9 ALSA: hda/realtek: Add quirk for HP SnowWhite laptops
Add support for HP SnowWhite laptops with CS35L51 amplifiers on I2C
bus connected to Realtek codec.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Message-ID: <20240405210635.22193-1-vitalyr@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-07 08:30:50 +02:00
Mark Brown
f3806fe542
ASoC: SOF: Intel: improve and extend HDaudio-based
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

For LunarLake, the SoundWire in-band wake detection is reported with
the HDAudio WAKE_EN/WAKE_STS registers. In the existing code, these
registers are only handled for HDaudio codecs. Now the same registers
have to be handled with care as shared resources.

The in-band wake detection mainly used for jack detection. Without
this patchset, the SoundWire headset codecs signal an event that would
be ignored and not reported.
2024-04-05 23:15:55 +01:00
Mark Brown
3018fdf7bd
ASoC: Intel: avs: Fixes and cleanups for 6.10
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Set of changes targeting the avs-driver only. No new features, patchset
either fixes or fortifies existing code.

Patchset starts off with a fix for debugbility on ICL+ platforms which I
have forgotten to fixup when providing support for these initially.
The next two address copier module initialization, most importantly,
silence the gcc 'field-spanning write' false-positive.

The following four:
6/13 ASoC: Intel: avs: Replace risky functions with safer variants
7/13 ASoC: Intel: avs: Fix potential integer overflow
8/13 ASoC: Intel: avs: Test result of avs_get_module_entry()
9/13 ASoC: Intel: avs: Remove dead code

address problems found out by Coverity static analysis tool.

The last two worth mentioning are: recommendation from the firmware team
to wake subsystem from D0ix when starting any pipeline -and- shielding
against invalid period/buffer sizes. Audio format shall be taken into
consideration when calculating either of these.

Amadeusz Sławiński (2):
  ASoC: Intel: avs: Restore stream decoupling on prepare
  ASoC: Intel: avs: Add assert_static to guarantee ABI sizes

Cezary Rojewski (11):
  ASoC: Intel: avs: Fix debug-slot offset calculation
  ASoC: Intel: avs: Silence false-positive memcpy() warnings
  ASoC: Intel: avs: Fix config_length for config-less copiers
  ASoC: Intel: avs: Fix ASRC module initialization
  ASoC: Intel: avs: Replace risky functions with safer variants
  ASoC: Intel: avs: Fix potential integer overflow
  ASoC: Intel: avs: Test result of avs_get_module_entry()
  ASoC: Intel: avs: Remove dead code
  ASoC: Intel: avs: Wake from D0ix when starting streaming
  ASoC: Intel: avs: Init debugfs before booting firmware
  ASoC: Intel: avs: Rule invalid buffer and period sizes out

 sound/soc/intel/avs/avs.h      |  1 +
 sound/soc/intel/avs/cldma.c    |  2 +-
 sound/soc/intel/avs/core.c     |  4 +--
 sound/soc/intel/avs/icl.c      | 12 ++++++---
 sound/soc/intel/avs/loader.c   |  6 +++--
 sound/soc/intel/avs/messages.h | 47 ++++++++++++++++++++++++++++++++--
 sound/soc/intel/avs/path.c     | 13 ++++------
 sound/soc/intel/avs/pcm.c      | 34 +++++++++++++++++++++++-
 sound/soc/intel/avs/probes.c   | 14 ++++++----
 9 files changed, 109 insertions(+), 24 deletions(-)

--
2.25.1
2024-04-05 23:15:43 +01:00
Cezary Rojewski
9a38599350
ASoC: Intel: avs: Rule invalid buffer and period sizes out
While HDAudio controller supports buffer packets up to 128 bytes low,
audio format shall be taken into consideration when calculating buffer
and period sizes to avoid undesired xruns.

As *_size in ALSA terms means frames (channels times bit-depth-bytes),
hw_rules can calculate minimal buffer and period sizes solely from
sample rate and the number of milliseconds commonly used on the
AudioDSP firmware side.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-14-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:12 +01:00
Amadeusz Sławiński
c2b10acb62
ASoC: Intel: avs: Add assert_static to guarantee ABI sizes
In order to make sure that IPC interface is stable use assert_static to
check union and struct sizes that describe communication interface.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-13-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:11 +01:00
Cezary Rojewski
ff0aefe2d2
ASoC: Intel: avs: Init debugfs before booting firmware
When bringing up setups it's vital to have access to debug functionality
even if firmware boot fails. As order of probe()ing operations is
changed, update remove() procedure accordingly.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-12-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:11 +01:00
Cezary Rojewski
30df76bbcb
ASoC: Intel: avs: Wake from D0ix when starting streaming
It is recommended to keep the DSP domain in full-power when starting DMA
engines.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-11-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:10 +01:00
Cezary Rojewski
d58275f474
ASoC: Intel: avs: Remove dead code
The result of list_next_entry()/list_last_entry() is never null.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-10-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:09 +01:00
Cezary Rojewski
41bf4525fa
ASoC: Intel: avs: Test result of avs_get_module_entry()
While PROBE_MOD_UUID is always part of the base AudioDSP firmware
manifest, from maintenance point of view it is better to check the
result.

Fixes: dab8d000e2 ("ASoC: Intel: avs: Add data probing requests")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:08 +01:00
Cezary Rojewski
c7e832cabe
ASoC: Intel: avs: Fix potential integer overflow
While stream_tag for CLDMA on SKL-based platforms is always 1, function
hda_cldma_setup() uses AZX_SD_CTL_STRM() macro which does:
	stream_tag << 20

what combined with stream_tag type of 'unsigned int' generates a
potential overflow issue. Update the field type to fix that.

Fixes: 45864e49a0 ("ASoC: Intel: avs: Implement CLDMA transfer")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:07 +01:00
Cezary Rojewski
4771484759
ASoC: Intel: avs: Replace risky functions with safer variants
strscpy() and snprintf() are the recommended equivalents of their
riskier friends.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:06 +01:00
Cezary Rojewski
9d2e26f31c
ASoC: Intel: avs: Fix ASRC module initialization
The ASRC module configuration consists of several reserved fields. Zero
them out when initializing the module to avoid sending invalid data.

Fixes: 274d79e518 ("ASoC: Intel: avs: Configure modules according to their type")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:05 +01:00
Cezary Rojewski
beeeee9686
ASoC: Intel: avs: Fix config_length for config-less copiers
Copier's config_length shall always be at least one even if there is no
configuration payload to carry. While the firmware treats
config_length=0 or 1 in the same manner, the driver shall initialize the
module properly.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:04 +01:00
Cezary Rojewski
6dd68c2da4
ASoC: Intel: avs: Silence false-positive memcpy() warnings
Commit df8fc4e934 ("kbuild: Enable -fstrict-flex-arrays=3") enforced
strict flex array declarations. This generates false-positive in form of:
"memcpy: detected field-spanning write". Avoid it by utilizing the
DECLARE_FLEX_ARRAY() macro.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:03 +01:00
Cezary Rojewski
c91b692781
ASoC: Intel: avs: Fix debug-slot offset calculation
For resources with ID other than 0 the current calculus is incorrect.

Fixes: 275b583d04 ("ASoC: Intel: avs: ICL-based platforms support")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:02 +01:00
Amadeusz Sławiński
680507581e
ASoC: Intel: avs: Restore stream decoupling on prepare
Revert changes from commit b87b8f43af ("ASoC: Intel: avs: Drop
superfluous stream decoupling") to restore working streaming during S3.

Fixes: b87b8f43af ("ASoC: Intel: avs: Drop superfluous stream decoupling")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05 13:13:01 +01:00
Takashi Iwai
100c85421b ASoC: Fixes for v6.9
A relatively large set of fixes here, the biggest piece of it is a
 series correcting some problems with the delay reporting for Intel SOF
 cards but there's a bunch of other things.  Everything here is driver
 specific except for a fix in the core for an issue with sign extension
 handling volume controls.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmYPJIUACgkQJNaLcl1U
 h9Ap8Qf/Xr2YP+KJxiD7g52grelyqjUdMCBkoB5Ndf4BU/mBl5X1yZkBuiTEB24D
 dcjamLuxNHGJhrHalYEfok6wRK3RMlkDZ8SNgpCP9rmOH0cSdt/8I3vUXA/XUKrx
 SnceTSZC1S7BSRk26IKf2UdFRULMSGpC87mVLxi7DT+nmuIAigGau3yBPXveG00p
 OLOYmJK9vwdlxAkfIp0ddYx3iTqfaq55W5ttWadoLG9gpoGbDzkvapBsZebqlGeo
 MkZrur70Vi7ousGATkzQHCkEUD8atNOTRrrAgVmzgBbUy3Y6LOmeMwiH306wXJAq
 XHiYYLCPlPI5myNYHeKmOQbCK1AzpA==
 =/2l+
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.9-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.9

A relatively large set of fixes here, the biggest piece of it is a
series correcting some problems with the delay reporting for Intel SOF
cards but there's a bunch of other things.  Everything here is driver
specific except for a fix in the core for an issue with sign extension
handling volume controls.
2024-04-05 08:48:12 +02:00
Pierre-Louis Bossart
35b5806e2e
ASoC: SOF: Intel: hda-ctrl: only clear WAKESTS for HDaudio codecs
When a PME wake happens due to a SoundWire wake, we currently clear
all WAKESTS bits during the resume operation initiated by the PCI
subsystem. As a result, we are unable to identify which SoundWire
links need to be resumed and don't properly handle jack detection.

This patch only clears the WAKESTS bits for the HDaudio codecs
detected earlier.

Note that we still clear all WAKESTS bits unconditionally in
hda_dsp_ctrl_stop_chip(). The existing behavior is potentially racy if
e.g. a jack event happens during a suspend routine, but there's a risk
of breaking shutdown or reboot sequences so the code is left as is for
now.

Closes: https://github.com/thesofproject/linux/issues/4687
Co-developed-by: Bard Liao <yung-chuan.liao@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>
Reviewed-by: Keqiao Zhang <keqiao.zhang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240404190357.138073-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 20:25:40 +01:00
Pierre-Louis Bossart
b69480edf4
ASoC: SOF: Intel: hda-codec: preserve WAKEEN values
Since LunarLake, we use the HDadio WAKEEN/WAKESTS to detect wakes for
SoundWire codecs. Unfortunately, the existing code in
hda_codec_jack_wake_enable() unconditionally resets the WAKEEN bits.

This patch changes the initialization to preserve SoundWire WAKEEN
bits. For HDAudio codecs the same strategy is used, WAKEEN is only set
when the jacktbl.used property is set.

Closes: https://github.com/thesofproject/linux/issues/4687
Co-developed-by: Bard Liao <yung-chuan.liao@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>
Reviewed-by: Keqiao Zhang <keqiao.zhang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240404190357.138073-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 20:25:39 +01:00
Pierre-Louis Bossart
ab9182441e
ASoC: SOF: Intel: lnl: add helper to detect SoundWire wakes
The global STATESTS register will provide information on all
links. Rather than iterate on all possible links, the helpers only
filters the range of possible bits for a quick lookup. The
process_wakeen() helper will walk through all the links and deal with
wakes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://msgid.link/r/20240404190357.138073-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 20:25:38 +01:00
Pierre-Louis Bossart
bd5863f9ef
ASoC: SOF: Intel: hda-ctrl: add missing WAKE_STS clear
For some reason, the programming sequences in the SOF driver do not
include a clear of the WAKE_STS bits before resetting the controller.

This clear is not formally required by the HDaudio specification, but
was added to harden the snd-hda-reset back in 2007. Adding this
sequence back avoids an issue reported by the Intel CI.

Closes: https://github.com/thesofproject/linux/issues/4889
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240404190357.138073-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 20:25:37 +01:00
Pierre-Louis Bossart
716778b3d7
ASoC: SOF: Intel: hda-stream: clarify comment
The Yoda grammar and multiple negatives are unclear.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240404185448.136157-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 19:58:28 +01:00
Pierre-Louis Bossart
d5263dbbd8
ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers
The HDaudio stream interrupts are ignored unless the stream is PCM or
compressed audio. For alternate non-audio usages, such as code loader
or SoundWire BPT case, the IOC interrupt on the last buffer
transferred is silently ignored.

This patch adds a 'struct completion' for each HDaudio stream. This
capability helps detect if the non-audio data transfers
completed. There is no performance impact for audio streams.

In the code loader case, the code currently starts the DMA and
directly checks if the firmware status changes, without checking if
the DMA succeeded. With a first pass waiting for the DMA to complete,
system validation engineers can gather more precise timing information
on firmware boot time or root-cause boot failures more accurately.

A timeout of 500ms was selected for the code loader DMA. This is an
experimental value which should be more than enough - higher values
would certainly be problematic from a usage/latency perspective.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240404185448.136157-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 19:58:27 +01:00
Pierre-Louis Bossart
6cbf086143
ASoC: SOF: Intel: hda-loader: change signature of code loader helpers
We need to reuse cl_prepare, cl_trigger and cl_cleanup helpers from a
SoundWire context where only the device information is
available. Rather than pass the 'sdev' argument, use get_drvdata() to
retrieve the required structure.

For consistency, rename hda_cl_stream_prepare() as hda_cl_prepare().

These three helpers are also exported so that they can be referenced
from another module.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240404185448.136157-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 19:58:26 +01:00
Pierre-Louis Bossart
e9ae5adce9
ASoC: SOF: Intel: hda-loader: add flag to tag ICCMAX stream
The existing code conflates capture stream and ICCMAX stream. This
isn't going to be true any longer when we add support for SDW BPT RX
streams. Add a boolean tag to flag ICCMAX streams.

No functionality change, only future-proofing change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://msgid.link/r/20240404185448.136157-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 19:58:25 +01:00
Chaitanya Kumar Borah
90f8917e7a
ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path
In cases where the sof driver is unable to find the firmware and/or
topology file [1], it exits without releasing the i915 runtime
pm wakeref [2]. This results in dmesg warnings[3] during
suspend/resume or driver unbind. Add remove_late() to the failure path
of sof_init_environment so that i915 wakeref is released appropriately

[1]

[    8.990366] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
[    8.990396] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
[    8.990398] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
[    8.990399] sof-audio-pci-intel-mtl 0000:00:1f.3:  Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[    8.990401] sof-audio-pci-intel-mtl 0000:00:1f.3:  Topology file: intel/sof-ace-tplg/sof-mtl-rt711-2ch.tplg
[    8.990402] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[    8.990403] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
[    8.990404] sof-audio-pci-intel-mtl 0000:00:1f.3:    https://github.com/thesofproject/sof-bin/
[    8.999088] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2

[2]

ref_tracker: 0000:00:02.0@ffff9b8511b6a378 has 1/5 users at
     track_intel_runtime_pm_wakeref.part.0+0x36/0x70 [i915]
     __intel_runtime_pm_get+0x51/0xb0 [i915]
     intel_runtime_pm_get+0x17/0x20 [i915]
     intel_display_power_get+0x2f/0x70 [i915]
     i915_audio_component_get_power+0x23/0x120 [i915]
     snd_hdac_display_power+0x89/0x130 [snd_hda_core]
     hda_codec_i915_init+0x3f/0x50 [snd_sof_intel_hda]
     hda_dsp_probe_early+0x170/0x250 [snd_sof_intel_hda_common]
     snd_sof_device_probe+0x224/0x320 [snd_sof]
     sof_pci_probe+0x15b/0x220 [snd_sof_pci]
     hda_pci_intel_probe+0x30/0x70 [snd_sof_intel_hda_common]
     local_pci_probe+0x4c/0xb0
     pci_device_probe+0xcc/0x250
     really_probe+0x18e/0x420
     __driver_probe_device+0x7e/0x170
     driver_probe_device+0x23/0xa0

[3]
[  484.105070] ------------[ cut here ]------------
[  484.108238] thunderbolt 0000:00:0d.2: PM: pci_pm_suspend_late+0x0/0x50 returned 0 after 0 usecs
[  484.117106] i915 0000:00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
[  484.792005] WARNING: CPU: 2 PID: 2405 at drivers/gpu/drm/i915/intel_runtime_pm.c:444 intel_runtime_pm_driver_release+0x6c/0x80

Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://github.com/thesofproject/linux/pull/4878
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://msgid.link/r/20240404184813.134566-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 19:51:51 +01:00
Mark Brown
fe4a074542
ASoC: Drop soc-topology ABI v4 support
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

This patchset impacts UAPI.

The only known users of the soc-topology ABI v4 are Chromebook
configurations. Starting from kernel v5.4, all of them are making use of
soc-topology ABI v5. The patchset first removes obsolete code from the
Intel's skylake-driver - the driver of choice for the mentioned
Chromebooks - and then proceeds with removal of relevant soc-topology.c
and uapi bits.

Cezary Rojewski (4):
  ASoC: Intel: Skylake: Remove soc-topology ABI v4 support
  ASoC: topology: Remove ABI v4 support
  ASoC: topology: Cleanup after ABI v4 support removal
  ASoC: topology: Remove obsolete ABI v4 structs

 include/uapi/sound/asoc.h               |  56 ------
 include/uapi/sound/skl-tplg-interface.h |  74 --------
 sound/soc/intel/skylake/skl-topology.c  | 169 -----------------
 sound/soc/soc-topology.c                | 241 ++----------------------
 4 files changed, 18 insertions(+), 522 deletions(-)

--
2.25.1
2024-04-04 18:09:18 +01:00
Dan Carpenter
2cfa0eea26
ASoC: SOF: Clean up sof_ipc_flood_dfs_write()
This function doesn't support partial writes so using
simple_write_to_buffer() doesn't really make sense.  It's better to
just use copy_from_user().

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/a35dded2-392b-4ccb-9dbb-d782ac9b6547@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 16:24:29 +01:00
Dan Carpenter
84ae7d9cfa
ASoC: SOF: Disable pointless writes to debugfs file
The permissions on this debugfs file are 0444 so it can't be written to.
And writing to the file hasn't done anything since commit 6e9548cdb3
("ASoC: SOF: Convert the generic IPC flood test into SOF client").
Delete the write function.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/9d2477cf-25aa-4d12-818f-fdafc9aaa28a@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 16:24:28 +01:00
Cezary Rojewski
82c192540b
ASoC: topology: Cleanup after ABI v4 support removal
Flag 'abi_match' along with several other local variables has no purpose
with v4 related members removed.

Cc: Curtis Malainey <cujomalainey@chromium.org>
Cc: Łukasz Majczak <lmajczak@google.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240403091629.647267-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 15:50:05 +01:00
Cezary Rojewski
c57468dc1f
ASoC: topology: Remove ABI v4 support
There are no users of soc-topology ABI v4 since kernel v5.4 so remove
all v4 -> v5 converters.

Cc: Curtis Malainey <cujomalainey@chromium.org>
Cc: Łukasz Majczak <lmajczak@google.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240403091629.647267-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 15:50:04 +01:00
Cezary Rojewski
251ea65205
ASoC: Intel: Skylake: Remove soc-topology ABI v4 support
The only known users are Chromebook configurations. Starting from
kernel v5.4, all of them are making use of soc-topology ABI v5.

Cc: Curtis Malainey <cujomalainey@chromium.org>
Cc: Łukasz Majczak <lmajczak@google.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240403091629.647267-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 15:50:03 +01:00
Mark Brown
98b1bb9ecf
ASoC: SOF: imx: stop using the imx8_*_clocks API
Merge series from Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>:

The imx8_*_clocks API requires keeping track of all of the clocks used
by the IMX SOF driver via an array. This is unnecessary and doesn't
scale well. As such, remove it altogether and replace it with
devm_clk_bulk_get_all() and friends.
2024-04-04 15:31:30 +01:00
Francesco Dolcini
9f1aeef4cb
ASoC: nau8822: Remove unused member from struct
Remove unused mclk_idx struct member.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://msgid.link/r/20240404111953.99287-1-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 12:59:42 +01:00
Arnd Bergmann
2ba2d17170
ASoC: codecs: rk3308: fix building without CONFIG_OF
The newly added codec has an extraneous of_match_ptr() annotation for
the ID table:

sound/soc/codecs/rk3308_codec.c:956:34: error: 'rk3308_codec_of_match' defined but not used [-Werror=unused-const-variable=]
  956 | static const struct of_device_id rk3308_codec_of_match[] = {

Remove it to avoid introducing a warning when -Wunused-const-variable
gets enabled by default:

Fixes: 4ed0915f5b ("ASoC: codecs: Add RK3308 internal audio codec driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://msgid.link/r/20240404095755.650364-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 12:59:41 +01:00
Vijendar Mukunda
b9846a3867
ASoC: SOF: amd: fix for false dsp interrupts
Before ACP firmware loading, DSP interrupts are not expected.
Sometimes after reboot, it's observed that before ACP firmware is loaded
false DSP interrupt is reported.
Registering the interrupt handler before acp initialization causing false
interrupts sometimes on reboot as ACP reset is not applied.
Correct the sequence by invoking acp initialization sequence prior to
registering interrupt handler.

Fixes: 738a2b5e2c ("ASoC: SOF: amd: Add IPC support for ACP IP block")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240404041717.430545-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-04 12:59:29 +01:00
Mark Brown
86f26aca49
ALSA: cirrus: Tidy up of firmware control read/write
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This set of patches factors out some repeated code to clean up
firmware control read/write functions, and removes some redundant
control notification code.

base-commit: f193957b0f
2024-04-03 20:45:32 +01:00
Mark Brown
b9cfeeb9b0
ASoC: codecs: rk3308: fix build warning without OF
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>:

This small series fixes a build warning reported by kernel test robot
<lkp@intel.com> and improves the Kconfig entry.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Changes in v2:
- Replaced v1 implementation with __maybe_unused
- Added patch to depend on || COMPILE_TEST
- Link to v1: https://lore.kernel.org/r/20240329-rk3308-audio-codec-fix-warning-v1-1-b9d177fcd6c9@bootlin.com

---
Luca Ceresoli (2):
      ASoC: codecs: rk3308: fix "defined but not used" warning on !OF
      ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST

 sound/soc/codecs/Kconfig        | 1 +
 sound/soc/codecs/rk3308_codec.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 4ed0915f5b
change-id: 20240329-rk3308-audio-codec-fix-warning-51bb572ebd96

Best regards,
--
Luca Ceresoli <luca.ceresoli@bootlin.com>
2024-04-03 18:56:57 +01:00
Peter Ujfalusi
3f5eb32513
ASoC: SOF: Intel: lnl: Disable DMIC/SSP offload on remove
During probe the DMIC/SSP offload is enabled and it is not reversed on
remove.

Add a remove wrapper for LNL to disable the offload for DMIC and SSP
similarly to what is done during probe.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@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://msgid.link/r/20240403111839.27259-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 18:47:08 +01:00
Mark Brown
f79b1758b8
ASoC: SOF: Intel: mtl/lnl: Improve firmware boot state
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

This series improves the firmware/boot state handling which will allow
failed IMR boot recovery and human readable boot failure decoding.

Additionally a new debugfs file is added to force a purge/clean boot
of the DSP for developers.
2024-04-03 16:28:31 +01:00
Simon Trimmer
d641def12e
ALSA: hda: hda_cs_dsp_ctl: Remove notification of driver write
Any control that the driver is updating should be marked as SYSTEM and
therefore will not have an ALSA control to notify.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://msgid.link/r/20240325113127.112783-6-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 16:10:31 +01:00
Simon Trimmer
e81f5c9f7d
ASoC: wm_adsp: Remove notification of driver write
Any control that the driver is updating should be marked as SYSTEM and
therefore will not have an ALSA control to notify.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://msgid.link/r/20240325113127.112783-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 16:10:30 +01:00
Simon Trimmer
62daf3df8a
ALSA: hda: hda_cs_dsp_ctl: Use cs_dsp_coeff_lock_and_[read|write]_ctrl()
Using the cs_dsp_coeff_lock_and_[read|write]_ctrl() wrappers tidies
the calling functions as it does not need to manage the DSP pwr_lock.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://msgid.link/r/20240325113127.112783-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 16:10:29 +01:00
Simon Trimmer
3802a9969b
ASoC: wm_adsp: Use cs_dsp_coeff_lock_and_[read|write]_ctrl()
Using the cs_dsp_coeff_lock_and_[read|write]_ctrl() wrappers tidies
the calling functions as it does not need to manage the DSP pwr_lock.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://msgid.link/r/20240325113127.112783-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 16:10:28 +01:00
Mark Brown
327719aa62
ASoC: Merge up fixes
Some of these, particularly the wm_adsp one in the immediate case, are
needed as a basis for new work.
2024-04-03 16:07:41 +01:00
Mark Brown
09bbc4f0d6
ASoC: Merge up left over v6.8 fix
This v6.8 change didn't make it into the release, send it as a fix for
v6.9.
2024-04-03 16:03:56 +01:00
Laurentiu Mihalcea
e618b8b37a
ASoC: SOF: imx: remove imx8_*_clocks API
Since the i.MX drivers no longer use the imx8_*_clocks API
this can be removed.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://msgid.link/r/20240328221201.24722-3-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 13:09:48 +01:00
Laurentiu Mihalcea
a358f67d16
ASoC: SOF: imx: drop usage of the imx8_*_clocks API
Currently, the driver has to keep track of all the clocks
it uses via an array of "struct clk_bulk_data", which doesn't
scale well and is unnecessary. As such, replace the usage of
the imx8_*_clocks with "devm_clk_bulk_get_all()" and friends.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://msgid.link/r/20240328221201.24722-2-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 13:09:47 +01:00
Luca Ceresoli
03246ade46
ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST
This codec is only known to exist in the RK3308 ARM64 SoC, so depend on it
except for compile test cases. Note that the driver won't probe without
CONFIG_OF, but ARM64 selects OF already so it is not needed.

Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://msgid.link/r/20240403-rk3308-audio-codec-fix-warning-v2-2-816bae4c1dc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:46:58 +01:00
Luca Ceresoli
38d5387b76
ASoC: codecs: rk3308: fix "defined but not used" warning on !OF
Building with CONFIG_OF=n triggers:

  warning: 'rk3308_codec_of_match' defined but not used [-Wunused-const-variable=]
  warning: unused variable 'rk3308_codec_of_match' [-Wunused-const-variable]

Even though OF is needed for probing, fix by declaring as __maybe_unused to
still allow building on non-OF configurations for build testing.

Fixes: 9fdd7b45da ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403271905.BYbGJiPi-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202403271907.0z0uuG5I-lkp@intel.com/
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://msgid.link/r/20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:46:57 +01:00
Peter Ujfalusi
40bdf121a3
ASoC: SOF: Intel: mtl: Correct the mtl_dsp_dump output
The ROM/firmware state handling has changed between CAVS and ACE
architecture:
CAVS: ROM and firmware uses the SRAM window for the state and status/error
code reporting

ACE: ROM code is using two registers to report the state and error while
the firmware is using the SRAM window to report states and status/error
codes.

Use the generic hda_dsp_get_state() to decode ROM state and error codes and
print out the firmware state and status/error code only if the SRAM
window is accessible - the firmware is booted and the Status readout is
not 0xffffffff.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:28 +01:00
Peter Ujfalusi
3dc2682870
ASoC: SOF: Intel: hda-dsp/mtl: Add support for ACE ROM state codes
The ROM state codes differ between CAVS and ACE architecture, there is a
slight overlap.
Add the ACE related state defines to mtl.h, introduce new table and
use it on case the function is called when running on ACE architecture.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:27 +01:00
Peter Ujfalusi
6b1c1c47e7
ASoC: SOF: Intel: mtl: Implement firmware boot state check
With the corrected rom_status_reg values we can now add a check for target
boot status for firmware booting.
With the check now we can identify failed firmware boots (IMR boots) and
we can use the fallback to purge boot the DSP.

Fixes: 064520e8ae ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:26 +01:00
Peter Ujfalusi
26187f44aa
ASoC: SOF: Intel: mtl: Disable interrupts when firmware boot failed
In case of error during the firmware boot we need to disable the interrupts
which were enabled as part of the boot sequence.

Fixes: 064520e8ae ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:25 +01:00
Peter Ujfalusi
b852574c67
ASoC: SOF: Intel: lnl: Correct rom_status_reg
ACE2 architecture changed the place where the ROM updates the status code
from the shared SRAM window (and HFFLGP1QW0 in ACE1) to HFDSC register for
the status and HFDEC (HFDSC + 4) for the error code.

The rom_status_reg is not used on LNL because it was wrongly assigned based
on older platform convention (SRAM window) and it was giving inconsistent
readings.

Add new header file for lnl specific register definitions.

Fixes: 64a63d9914 ("ASoC: SOF: Intel: LNL: Add support for Lunarlake platform")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:24 +01:00
Peter Ujfalusi
1f1b820dc3
ASoC: SOF: Intel: mtl: Correct rom_status_reg
ACE1 architecture changed the place where the ROM updates the status code
from the shared SRAM window to HFFLGP1QW0 register for the status and
HFFLGP1QW0 + 4 for the error code.

The rom_status_reg is not used on MTL because it was wrongly assigned based
on older platform convention (SRAM window) and it was giving inconsistent
readings.

Fixes: 064520e8ae ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:23 +01:00
Peter Ujfalusi
bbdf9af261
ASoC: SOF: Intel: hda: Create debugfs file to force a clean DSP boot
When IMR boot is supported on a platform it is always going to be used to
boot the DSP unless some catastrophic event happens.
There is no way for a developer to force a clean DSP boot without removing
and re-inserting the modules.

Create a 'skip_imr_boot' debugfs file which can be used to force the
next DSP boot as clean (prune) boot.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240403105210.17949-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 12:04:23 +01:00
Amadeusz Sławiński
5faf65b5d1
ASoC: Intel: avs: rt5682: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-11-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:19 +01:00
Amadeusz Sławiński
a055674868
ASoC: Intel: avs: rt5663: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-10-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:19 +01:00
Amadeusz Sławiński
33a886eee7
ASoC: Intel: avs: rt298: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-9-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:18 +01:00
Amadeusz Sławiński
682bedc8b0
ASoC: Intel: avs: rt286: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:17 +01:00
Amadeusz Sławiński
130c953a75
ASoC: Intel: avs: rt274: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:16 +01:00
Amadeusz Sławiński
bf400f16a0
ASoC: Intel: avs: nau8825: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:15 +01:00
Amadeusz Sławiński
2dbe7c8098
ASoC: Intel: avs: es8336: Constify card_headset_pins
card_headset_pins is never modified, mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:14 +01:00
Amadeusz Sławiński
a3c95efc43
ASoC: Intel: avs: hdaudio: Constify probing_link
probing_link is passed to devm_kmemdup, and is never modified, may as
well mark it const.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/20240403093145.3375857-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-03 11:05:13 +01:00