Commit Graph

1309347 Commits

Author SHA1 Message Date
Amadeusz Sławiński
9eb2142a2a
ASoC: topology: Bump minimal topology ABI version
When v4 topology support was removed, minimal topology ABI version
should have been bumped.

Fixes: fe4a074542 ("ASoC: Drop soc-topology ABI v4 support")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20241009081230.304918-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-10 12:15:03 +01:00
Zhu Jun
251ce34a44
ASoC: codecs: Fix error handling in aw_dev_get_dsp_status function
Added proper error handling for register value check that
return -EPERM when register value does not meet expected condition

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241009073938.7472-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-10 12:15:01 +01:00
Alexey Klimov
d0e806b0cc
ASoC: qcom: sdm845: add missing soundwire runtime stream alloc
During the migration of Soundwire runtime stream allocation from
the Qualcomm Soundwire controller to SoC's soundcard drivers the sdm845
soundcard was forgotten.

At this point any playback attempt or audio daemon startup, for instance
on sdm845-db845c (Qualcomm RB3 board), will result in stream pointer
NULL dereference:

 Unable to handle kernel NULL pointer dereference at virtual
 address 0000000000000020
 Mem abort info:
   ESR = 0x0000000096000004
   EC = 0x25: DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
   FSC = 0x04: level 0 translation fault
 Data abort info:
   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 user pgtable: 4k pages, 48-bit VAs, pgdp=0000000101ecf000
 [0000000000000020] pgd=0000000000000000, p4d=0000000000000000
 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
 Modules linked in: ...
 CPU: 5 UID: 0 PID: 1198 Comm: aplay
 Not tainted 6.12.0-rc2-qcomlt-arm64-00059-g9d78f315a362-dirty #18
 Hardware name: Thundercomm Dragonboard 845c (DT)
 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : sdw_stream_add_slave+0x44/0x380 [soundwire_bus]
 lr : sdw_stream_add_slave+0x44/0x380 [soundwire_bus]
 sp : ffff80008a2035c0
 x29: ffff80008a2035c0 x28: ffff80008a203978 x27: 0000000000000000
 x26: 00000000000000c0 x25: 0000000000000000 x24: ffff1676025f4800
 x23: ffff167600ff1cb8 x22: ffff167600ff1c98 x21: 0000000000000003
 x20: ffff167607316000 x19: ffff167604e64e80 x18: 0000000000000000
 x17: 0000000000000000 x16: ffffcec265074160 x15: 0000000000000000
 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
 x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff167600ff1cec
 x5 : ffffcec22cfa2010 x4 : 0000000000000000 x3 : 0000000000000003
 x2 : ffff167613f836c0 x1 : 0000000000000000 x0 : ffff16761feb60b8
 Call trace:
  sdw_stream_add_slave+0x44/0x380 [soundwire_bus]
  wsa881x_hw_params+0x68/0x80 [snd_soc_wsa881x]
  snd_soc_dai_hw_params+0x3c/0xa4
  __soc_pcm_hw_params+0x230/0x660
  dpcm_be_dai_hw_params+0x1d0/0x3f8
  dpcm_fe_dai_hw_params+0x98/0x268
  snd_pcm_hw_params+0x124/0x460
  snd_pcm_common_ioctl+0x998/0x16e8
  snd_pcm_ioctl+0x34/0x58
  __arm64_sys_ioctl+0xac/0xf8
  invoke_syscall+0x48/0x104
  el0_svc_common.constprop.0+0x40/0xe0
  do_el0_svc+0x1c/0x28
  el0_svc+0x34/0xe0
  el0t_64_sync_handler+0x120/0x12c
  el0t_64_sync+0x190/0x194
 Code: aa0403fb f9418400 9100e000 9400102f (f8420f22)
 ---[ end trace 0000000000000000 ]---

0000000000006108 <sdw_stream_add_slave>:
    6108:       d503233f        paciasp
    610c:       a9b97bfd        stp     x29, x30, [sp, #-112]!
    6110:       910003fd        mov     x29, sp
    6114:       a90153f3        stp     x19, x20, [sp, #16]
    6118:       a9025bf5        stp     x21, x22, [sp, #32]
    611c:       aa0103f6        mov     x22, x1
    6120:       2a0303f5        mov     w21, w3
    6124:       a90363f7        stp     x23, x24, [sp, #48]
    6128:       aa0003f8        mov     x24, x0
    612c:       aa0203f7        mov     x23, x2
    6130:       a9046bf9        stp     x25, x26, [sp, #64]
    6134:       aa0403f9        mov     x25, x4        <-- x4 copied to x25
    6138:       a90573fb        stp     x27, x28, [sp, #80]
    613c:       aa0403fb        mov     x27, x4
    6140:       f9418400        ldr     x0, [x0, #776]
    6144:       9100e000        add     x0, x0, #0x38
    6148:       94000000        bl      0 <mutex_lock>
    614c:       f8420f22        ldr     x2, [x25, #32]!  <-- offset 0x44
    ^^^
This is 0x6108 + offset 0x44 from the beginning of sdw_stream_add_slave()
where data abort happens.
wsa881x_hw_params() is called with stream = NULL and passes it further
in register x4 (5th argument) to sdw_stream_add_slave() without any checks.
Value from x4 is copied to x25 and finally it aborts on trying to load
a value from address in x25 plus offset 32 (in dec) which corresponds
to master_list member in struct sdw_stream_runtime:

struct sdw_stream_runtime {
        const char  *              name;	/*     0     8 */
        struct sdw_stream_params   params;	/*     8    12 */
        enum sdw_stream_state      state;	/*    20     4 */
        enum sdw_stream_type       type;	/*    24     4 */
        /* XXX 4 bytes hole, try to pack */
 here-> struct list_head           master_list;	/*    32    16 */
        int                        m_rt_count;	/*    48     4 */
        /* size: 56, cachelines: 1, members: 6 */
        /* sum members: 48, holes: 1, sum holes: 4 */
        /* padding: 4 */
        /* last cacheline: 56 bytes */

Fix this by adding required calls to qcom_snd_sdw_startup() and
sdw_release_stream() to startup and shutdown routines which restores
the previous correct behaviour when ->set_stream() method is called to
set a valid stream runtime pointer on playback startup.

Reproduced and then fix was tested on db845c RB3 board.

Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: stable@vger.kernel.org
Fixes: 15c7fab0e0 ("ASoC: qcom: Move Soundwire runtime stream alloc to soundcards")
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org> # Lenovo Yoga C630
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://patch.msgid.link/20241009213922.999355-1-alexey.klimov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-10 12:15:00 +01:00
Binbin Zhou
a6134e7b4d
ASoC: loongson: Fix component check failed on FDT systems
Add missing snd_soc_dai_link.platforms assignment to avoid
soc_dai_link_sanity_check() failure.

Fixes: d24028606e ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/6645888f2f9e8a1d8d799109f867d0f97fd78c58.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-10 12:14:59 +01:00
Mark Brown
7d04763cae
ASoC: Some issues about loongson i2s
Merge series from Binbin Zhou <zhoubinbin@loongson.cn>:

This patch set is mainly about Loongson i2s related issues.

Please allow me to briefly explain this patch set:
Patch 1-2: Add ES8323 codec required on Loongson-2K2000
Patch 3-4: Add uda1342 codec required on Loongson-2K1000
Patch 5: Fix the problem of unable to detect codec under FDT system.
Patch 6-7: Add Loongson i2s platform device support
2024-10-10 10:49:10 +01:00
Mark Brown
721c55be2d
ASoC: SOF: ipc4-topology: Rework the module audio
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

When the audio started we print out here and there the Input and Output or only
the Input audio format for the module that is in path of the stream.
This is mostly OK but provides inconsistent an - in my opinion - hard to grasp
information.

The series reworks how the input/output format is selected and tries to improve
the consistency of the prints by applying universal rules:

- Module is not changing the format or it has only input or output and it has
  single format on in and out side

	Audio format for gain.1.1:

- Module is not changing the format or it has only input or output and it has
  multiple formats on either in or out side

	Audio format (in/out format index: 2/0) for host-copier.0.playback:

- Module is changing format then we print the input and output ones
- Input if it has single format

	Input audio format for host-copier.0.capture:

- Input has multiple formats

	Input audio format (format index: 0) for host-copier.0.playback:

Similar versions for the output format prints.
2024-10-10 10:49:04 +01:00
Binbin Zhou
ba4c5fad59
ASoC: loongson: Add I2S controller driver as platform device
The Loongson I2S controller exists not only in PCI form (LS7A bridge
chip), but also in platform device form (Loongson-2K1000 SoC).

This patch adds support for platform device I2S controller.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/36c143358c7f48bc2e73c30e1d2009b2f2fc6498.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:53 +01:00
Binbin Zhou
d4c2e9e33a
ASoC: dt-bindings: Add Loongson I2S controller
Add Loongson I2S controller binding with DT schema format using
json-schema.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/91e49509f1aaa70e635b6662ed9fffaf31165799.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:52 +01:00
Binbin Zhou
de0fb25e37
ASoC: codecs: Add uda1342 codec driver
The UDA1342 is an NXP audio codec, support 2x Stereo audio ADC (4x PGA
mic inputs), stereo audio DAC, with basic audio processing.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/927e46b48ca84865a216ce08e7c53df59c2a8c0b.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:51 +01:00
Binbin Zhou
de56743159
ASoC: dt-bindings: Add NXP uda1342 Codec
Add NXP uda1342 CODEC binding with DT schema format using json-schema.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/d75045f8051d6e7a2a711c86a52a7c0a43775d08.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:50 +01:00
Binbin Zhou
b97391a604
ASoC: codecs: Add support for ES8323
Add a codec driver for the Everest ES8323. It supports two separate
audio outputs and two separate audio inputs.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/135b19b06d19f34af8a0419bd3782ce5b8779870.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:49 +01:00
Binbin Zhou
5bf2bea8a8
ASoC: dt-bindings: Add Everest ES8323 Codec
Add DT bindings documentation for the Everest-semi ES8323 codec.

Everest-semi ES8323 codec is a low-power mono audio codec with I2S
audio interface and I2C control.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/414f829342a7b0f9d02a291eb9fd355cbef50005.1728459624.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-09 14:40:49 +01:00
Benjamin Bara
3fe9f5882c
ASoC: dapm: avoid container_of() to get component
The current implementation does not work for widgets of DAPMs without
component, as snd_soc_dapm_to_component() requires it. If the widget is
directly owned by the card, e.g. as it is the case for the tegra
implementation, the call leads to UB. Therefore directly access the
component of the widget's DAPM to be able to check if a component is
available.

Fixes: f82eb06a40 ("ASoC: tegra: machine: Handle component name prefix")
Cc: stable@vger.kernel.org # v6.7+
Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Link: https://patch.msgid.link/20241008-tegra-dapm-v2-1-5e999cb5f0e7@skidata.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:52:23 +01:00
Peter Ujfalusi
47701a85af
ASoC: SOF: ipc4-topology: Add helper function to print the module's in/out audio format
Introduce a helper function to print out the audio format(s) used by a
module in a consistent way.

The printed text depends on the module format configuration, taking into
account if they have both input and output support, the format is changed
by the module and the number of formats supported on input/output.

For example, if a module does not change format, there is no point of
printing both in and out format, it is adequate to just state the format
the module is using.

While the function to generate the print is fairly complex (but not too
much), it will create a cleaner experience on the reader side by handling
the filtering of the information and present it in a way that it - I hope -
makes the developer's live a bit more easier when tracking format changes.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:42 +01:00
Peter Ujfalusi
22408b8f62
ASoC: SOF: ipc4-topology: Concentrate prints inside of sof_ipc4_init_output_audio_fmt()
Similarly to sof_ipc4_init_input_audio_fmt(), move all output format
selection related prints (success or failure) inside of the
sof_ipc4_init_output_audio_fmt() function.

To do this, we need to pass swidget also, like with the input counterpart.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:41 +01:00
Peter Ujfalusi
fdaf229152
ASoC: SOF: ipc4-topology: Simplify code to deal with process modules without output
Process modules are allowed to have zero outputs, thus zero output formats.

In this case there is no need for complicated if expressions to handle such
cases, we can just use a single if for the number of output formats and
the rest can be simplified.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:40 +01:00
Peter Ujfalusi
7a4c41e477
ASoC: SOF: ipc4-topology: Use local variables in sof_ipc4_init_output_audio_fmt()
Use local variables for available_fmt->output_pin_fmts and
available_fmt->num_output_formats similarly to the input format selection
to make the two functions easier to understand and help with readability.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:40 +01:00
Peter Ujfalusi
0126a659fd
ASoC: SOF: ipc4-topology: Simplify match format print in sof_ipc4_init_input_audio_fmt()
Print out the information line for the found input format once to avoid
duplicated prints in case when multiple formats are available.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:39 +01:00
Peter Ujfalusi
2d9635b57b
ASoC: SOF: ipc4-topology: Remove redundant check in sof_ipc4_init_input_audio_fmt()
At label in_fmt the if (pin_fmts_size && i < pin_fmts_size) is guarantied
to be true all the time, drop the check completely.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:38 +01:00
Peter Ujfalusi
3b54c1cd69
ASoC: SOF: ipc4-topology: Use local variables in sof_ipc4_init_input_audio_fmt()
We have local copies of available_fmt->input_pin_fmts and
available_fmt->num_input_formats, use them in the function.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:37 +01:00
Peter Ujfalusi
76733db0f5
ASoC: SOF: ipc4-topology: Drop the 'index' from 'Pin index' of format print
Printing the word `index` does not give extra information over printing:
`Pin #%d` which tells that the format line is for a specific pin.

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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241008110936.22534-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 13:28:36 +01:00
Jack Yu
e5553cb661
ASoC: rt721-sdca: Fix issue of warning message
Fix issue of warning messages caused by some variables.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/065c0b7d84cf47d3a9186235447521c5@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:21 +01:00
Zhu Jun
53189ae7aa
ASoC: aw88399: Correct error handling in aw_dev_get_dsp_status function
Added proper error handling for register value check that
return -EPERM when register value does not meet expected condition

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241008025923.10606-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:20 +01:00
Kai Vehmanen
9814c1447f
ASoC: SOF: Intel: hda-loader: do not wait for HDaudio IOC
Commit 9ee3f0d8c9 ("ASOC: SOF: Intel: hda-loader: only wait for
HDaudio IOC for IPC4 devices") removed DMA wait for IPC3 case.
Proceed and remove the wait for IPC4 devices as well.

There is no dependency to IPC version in the load logic and
checking the firmware status is a sufficient check in case of
errors.

The removed code also had a bug in that -ETIMEDOUT is returned
without stopping the DMA transfer.

Cc: stable@vger.kernel.org
Link: https://github.com/thesofproject/linux/issues/5135
Fixes: 9ee3f0d8c9 ("ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices")
Suggested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20241008060710.15409-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:14 +01:00
Venkata Prasad Potturu
494ddacd4a
ASoC: SOF: amd: Fix for ACP SRAM addr for acp7.0 platform
Incorrect SRAM base addr for acp7.0 platform results firmware boot
failure.
Add condition check to support SRAM addr for various platforms.

Fixes: 145d7e5ae8 ("ASoC: SOF: amd: add option to use sram for data bin loading")

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20241008091347.594378-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:13 +01:00
Venkata Prasad Potturu
0a5c40393b
ASoC: SOF: amd: Add error log for DSP firmware validation failure
Add dev_err to print ACP_SHA_DSP_FW_QUALIFIER and ACP_SHA_PSP_ACK
register values for PSP firmware validation failure case.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20241008091347.594378-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:12 +01:00
Amadeusz Sławiński
0dbb186c35
ASoC: Intel: avs: Update stream status in a separate thread
Function snd_pcm_period_elapsed() is part of sequence servicing HDAudio
stream IRQs. It's called under Global Interrupt Enable (GIE) disabled -
no HDAudio interrupts will be raised. At the same time, the function may
end up calling __snd_pcm_xrun() or snd_pcm_drain_done(). On the
avs-driver side, this translates to IPCs and as GIE is disabled, these
will never complete successfully.

Improve system stability by scheduling stream-IRQ handling in a separate
thread.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20241008083758.756578-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-08 10:49:11 +01:00
Heiko Stuebner
5cd575a87f
ASoC: dt-bindings: rockchip,rk3036-codec: convert to yaml
Convert the binding to yaml.

The codec seems to be from Innosilicon, but the compatible has ever only
been rockchip-based, as they sythesized the codec for the rk3036.

So the yaml file gets a name matching that compatible.
The only other notable change is the addition of the #sound-dai-cells
property, that is always required.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241007205639.2477635-1-heiko@sntech.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 22:51:59 +01:00
Mark Brown
7c66c4f782
ASoC: Intel: add rt722/rt721 support for PTL platform
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Rt722, rt721 and rt712 codecs are quite similar. Refactor the existing
spk_rtd_init() to support Realtek common multifunction SDCA codecs.
2024-10-07 20:34:48 +01:00
Mark Brown
128e5cb6c6
Fixes and improvements related to amd soundwire
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series consists of smatch error fixes and code improvements
related to amd soundwire generic machine driver.

Vijendar Mukunda (3):
  ASoC: amd: acp: fix for inconsistent indenting
  ASoC: amd: acp: fix for cpu dai index logic
  ASoC: amd: acp: refactor sof_card_dai_links_create() function

 sound/soc/amd/acp/acp-sdw-sof-mach.c | 47 +++++++++++-----------------
 1 file changed, 18 insertions(+), 29 deletions(-)

--
2.34.1
2024-10-07 20:34:37 +01:00
Jack Yu
86ce355c1f
ASoC: rt721-sdca: Add RT721 SDCA driver
This is the initial codec driver for rt721-sdca.
It's a three functions (jack,mic,amp) soundwire driver.

Signed-off-by: Jack Yu <jack.yu@realtek.com>

v2: Fix typo in mbq default registers.
v3: Include soundwire common functions for Realtek.
Link: https://patch.msgid.link/d18b35f8b6934fc6a2be6c4458a63fe5@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 17:11:09 +01:00
Jack Yu
bbca8e7050
ASoC: rt-sdw-common: Common functions for Realtek soundwire driver
This is the first version of common functions for Realtek
soundwire codec driver.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/959e8dcb075948459be4463f6a4ca6ee@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 17:11:08 +01:00
Naveen Manohar
846a8d3cf3
ASoC: Intel: soc-acpi-intel-ptl-match: Add rt721 support
Patch adds driver data & match table for rt721
multi-function codec on PTL-RVP at sdw link3.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241007075955.12575-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 17:10:55 +01:00
Naveen Manohar
10488630e1
ASoC: intel/sdw_utils: refactor RT multifunction sdca speaker codecs
Merge spk_rtd_init for multifunction sdca codecs:rt712/rt722

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241007075955.12575-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 17:10:54 +01:00
Dharageswari R
69a5d2d0d9
ASoC: intel: sof_sdw: add RT722 SDCA card for PTL platform
Enable on-board rt722 based sound card for PTL RVP.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241007075955.12575-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 17:10:53 +01:00
Vijendar Mukunda
0372abfcd8
ASoC: amd: acp: refactor sof_card_dai_links_create() function
Refactor sof_card_dai_links_create() function by replacing
'sof_ends' and 'sof_dais' structure declarations as
struct asoc_sdw_endpoint *sof_ends __free(kfree) = NULL;
struct asoc_sdw_dailink *sof_dais __free(kfree) = NULL;
Use above declarations to eliminate goto statements usage.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241007085321.3991149-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 15:35:46 +01:00
Vijendar Mukunda
7ce8e4d380
ASoC: amd: acp: fix for cpu dai index logic
Multi link aggregation is not supported for acp6.3 platform.
Below combinations are supported.
- one sdw BE DAI <---> one-cpu DAI <---> one-codec DAI
- one sdw BE DAI  <---> one-cpu DAI <---> multi-codec DAIs
As Single cpu dai is going to be created, In create_sdw_dailink() function
cpu dai index won't be incremented.
Refactor cpu dai index logic to fix below smatch static checker warning.
sound/soc/amd/acp/acp-sdw-sof-mach.c:157 create_sdw_dailink()
warn: iterator 'i' not incremented.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/
Fixes: 6d8348ddc5 ("ASoC: amd: acp: refactor SoundWire machine driver code")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241007085321.3991149-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 15:35:45 +01:00
Vijendar Mukunda
914219d749
ASoC: amd: acp: fix for inconsistent indenting
Fix below Smatch static checker warning:

sound/soc/amd/acp/acp-sdw-sof-mach.c:365 sof_card_dai_links_create()
warn: inconsistent indenting

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/
Fixes: 6d8348ddc5 ("ASoC: amd: acp: refactor SoundWire machine driver code")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20241007085321.3991149-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 15:35:44 +01:00
Miquel Raynal
8380dbf1b9
ASoC: dt-bindings: davinci-mcasp: Fix interrupt properties
Combinations of "tx" alone, "rx" alone and "tx", "rx" together are
supposedly valid (see link below), which is not the case today as "rx"
alone is not accepted by the current binding.

Let's rework the two interrupt properties to expose all correct
possibilities.

Cc: Péter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/linux-sound/20241003102552.2c11840e@xps-13/T/#m277fce1d49c50d94e071f7890aed472fa2c64052
Fixes: 8be90641a0 ("ASoC: dt-bindings: davinci-mcasp: convert McASP bindings to yaml schema")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241003083611.461894-1-miquel.raynal@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 15:35:35 +01:00
Zichen Xie
49da1463c9
ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
possibly return NULL pointer. NULL Pointer Dereference may be
triggerred without addtional check.
Add a NULL check for the returned pointer.

Fixes: b5022a36d2 ("ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers")
Cc: stable@vger.kernel.org
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Link: https://patch.msgid.link/20241006205737.8829-1-zichenxie0106@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-07 15:35:34 +01:00
Mark Brown
344190e034 Linux 6.12-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmcDD/seHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGNpoH/3oEXaHBl5wrRJKP
 GpzfT35Do052IZnRl0dmanr92opV5O7R4esVyHIS4IOKkt7C2aEEoVrMKAqW/VH9
 EkcLPJwOuJ1xyqnLWycQUEN/JK9hxM9DlAVUVg9JdbDE4b91ebwTivwJMTJ7tQwm
 +P/ifzV1r4fsYgpasqwVQMwLWuZ8O6OCGXE4KlgwiaS5zLdiVG+zkvvli/x/YHQ9
 dPgQ+OXyoQz57Iwj02ZHBkdqJxa9vPVPASjtzuRp0v7VGaMq8gvVH8pA4B7cGjfV
 xWvT+sjYjXVltYfmUHgUDNNTfeJArxH+BqpJ+lShcYwjxomYFfJWT0KZOPQwg/3z
 zfAZtk4=
 =RHAh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmcD6BATHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0CWZB/9ieSApsJcY8vWa5GpRbR7AXIlKb0tk
 9J8pFnEMzKCRbnVL8PXsBRUD4t6ebnMssg+lbT9mmA3xydcL+KzHFyLhU6euUS91
 t9yEB7m42uguoa1T4w17EF/P1AK7IDDK0UaY/0Ce+NiSbJ6QRKpnzzRbnt4D05Jv
 rnSM4vNLOHzIBObHNKbJU/QsJnketvs38tOgVetECynlS/o6+Df3/ef4uUi0Pnb7
 u+ReWYP0alxEOI73MlihRKoqVt6yGhXBZXs7CM3cz67mJ/ZySQyB2g/I7hCHMw66
 5QaD6tnmq6uEk7eT/qVnadqbPppHs7zSlMLB4BeRg0mtn47liR4ho8mK
 =OvmS
 -----END PGP SIGNATURE-----

ASoC: Merge up v6.12

Fixes build issues with the KVM selftests
2024-10-07 14:54:21 +01:00
Linus Torvalds
8cf0b93919 Linux 6.12-rc2 2024-10-06 15:32:27 -07:00
Linus Torvalds
2a130b7e1f Kbuild fixes for v6.12
- Move non-boot built-in DTBs to the .rodata section
 
  - Fix Kconfig bugs
 
  - Fix maint scripts in the linux-image Debian package
 
  - Import some list macros to scripts/include/
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmcCywIVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGcMIP/RtieEEbhV78TJi370MJAr2Yhqw7
 Iy43bJZixfdTXU558a/jrtngyDOz0NQ2AUnFGWI+aXdiSTrign34s2lZmO8IUQT+
 Z+LoBD9GTel6W4zWMMKKXc1dNAVXSGy3FAy/ElJtFmVWKpffr5zGlNEcWEyiK0RH
 UbGeHdCfNCuc4HuTc4yjFHUMmtiFy3MSnqIwohwXSfGvfr35YlcCdlvnktqi9Gdm
 65+7rHLIKVV+uiLWikVMjN8VMfnqdkKNYWeE6sBqY+bMKR772Sx1O6dm+cqYHeVI
 Y20U6UxnM+YJopAt7GoD88MYYxxCx9jDVAls7vTtdCzgoN83DBCI6wqVw1LjmpvO
 CRp83BrgOJI1wmojj5lx3TqaB6miMqTBkhImeG8yfRPYek1if1B9Nn7YSP485ULg
 vnID0GHemGpltORjB8kV1Kb1XsR8PtNEJVw8b0o/vo33HFevjbWFaJwOZWZ8u7nN
 CxYD05qPx3HoIHmbvg5dAjgJrJ540R5GIkscBVoA4kAzBhBTh+0l3LaI1bguHe+H
 WD08bvlMIAHmWtUzziD/iPKwLx1DtuTBat9yw3nL3otG9HG4uGPSPFzEaDPx4h5j
 vITE+CA0ta4dPhfttrFaqKmDRnpP2ALJrqIupcj61tCviV/ppZox7wkGAE+qkLQi
 j6TjwHenDz7g/M6M
 =1a8G
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Move non-boot built-in DTBs to the .rodata section

 - Fix Kconfig bugs

 - Fix maint scripts in the linux-image Debian package

 - Import some list macros to scripts/include/

* tag 'kbuild-fixes-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: deb-pkg: Remove blank first line from maint scripts
  kbuild: fix a typo dt_binding_schema -> dt_binding_schemas
  scripts: import more list macros
  kconfig: qconf: fix buffer overflow in debug links
  kconfig: qconf: move conf_read() before drawing tree pain
  kconfig: clear expr::val_is_valid when allocated
  kconfig: fix infinite loop in sym_calc_choice()
  kbuild: move non-boot built-in DTBs to .rodata section
2024-10-06 11:34:55 -07:00
Linus Torvalds
c8d9f2c7aa platform-drivers-x86 for v6.12-2
Highlights:
  -  Intel PMC fix for suspend/resume issues on some Sky and Kaby Lake laptops
  -  Intel Diamond Rapids hw-id additions
  -  Documentation and MAINTAINERS fixes
  -  Some other small fixes
 
 The following is an automated git shortlog grouped by driver:
 
 ISST:
  -  Add Diamond Rapids to support list
  -  Fix the KASAN report slab-out-of-bounds bug
 
 MAINTAINERS:
  -  Update Intel In Field Scan(IFS) entry
 
 dell-ddv:
  -  Fix typo in documentation
 
 dell-laptop:
  -  Do not fail when encountering unsupported batteries
 
 dell-sysman:
  -  add support for alienware products
 
 intel/pmc:
  -  Disable ACPI PM Timer disabling on Sky and Kaby Lake
 
 platform/x86/intel:
  -  power-domains: Add Diamond Rapids support
 
 wmi:
  -  Update WMI driver API documentation
 
 x86-android-tablets:
  -  Fix use after free on platform_device_register() errors
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmcCbogUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xFEgf/UYsNHFO5P5IVwWIoXzyFgRNg8zQU
 trABCxfCZztZOEwRVJKZ0lVLbkKULdBJE4Tj7RwhZiCubcupV5LJT5OLe5R+AFGK
 qhG2FTo9uHacwEXPMZyBAnj+aW6sSnVATAQgBZFnZ0SdInuOjlAmMvAL48MfNnEO
 Nw7EiGtAvkl7R9XHBsF7vs6EFewjy+ZFMoslZq90UUhfK51DCu74w7hv8vY5oG50
 pstbW3aqn5nmCKcPhQNW7ZmG6ukpdKkl74u1hdW6JRuBruFrZWR6px1xax6+Q/Is
 /ib4x69irCN+sBTX7fGTPNsO+Oaq0GmUfeiGdcZA2SjmIJ8P4yvPAuNBbw==
 =Nfjz
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

 - Intel PMC fix for suspend/resume issues on some Sky and Kaby Lake
   laptops

 - Intel Diamond Rapids hw-id additions

 - Documentation and MAINTAINERS fixes

 - Some other small fixes

* tag 'platform-drivers-x86-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: x86-android-tablets: Fix use after free on platform_device_register() errors
  platform/x86: wmi: Update WMI driver API documentation
  platform/x86: dell-ddv: Fix typo in documentation
  platform/x86: dell-sysman: add support for alienware products
  platform/x86/intel: power-domains: Add Diamond Rapids support
  platform/x86: ISST: Add Diamond Rapids to support list
  platform/x86:intel/pmc: Disable ACPI PM Timer disabling on Sky and Kaby Lake
  platform/x86: dell-laptop: Do not fail when encountering unsupported batteries
  MAINTAINERS: Update Intel In Field Scan(IFS) entry
  platform/x86: ISST: Fix the KASAN report slab-out-of-bounds bug
2024-10-06 11:11:01 -07:00
Linus Torvalds
4563243ede ARM64:
* Fix pKVM error path on init, making sure we do not change critical
   system registers as we're about to fail
 
 * Make sure that the host's vector length is at capped by a value
   common to all CPUs
 
 * Fix kvm_has_feat*() handling of "negative" features, as the current
   code is pretty broken
 
 * Promote Joey to the status of official reviewer, while James steps
   down -- hopefully only temporarly
 
 x86:
 
 * Fix compilation with KVM_INTEL=KVM_AMD=n
 
 * Fix disabling KVM_X86_QUIRK_SLOT_ZAP_ALL when shadow MMU is in use
 
 Selftests:
 
 * Fix compilation on non-x86 architectures
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmcCRMgUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMNIgf/T80+VxFy7eP1yTkZy9nd3UjSsAeT
 fWvYMyN2isOTWTVbl3ckjMZc4i7L/nOngxfkLzI3OfFUO8TI8cw11hNFn85m+WKM
 95DVgEaqz1kuJg25VjSj9AySvPFDNec8bV37C2vk2jF4YsGo6qBugSSjktZUgGiW
 ozsdV39lcVcLf+x8/52Vc2eb736nrrYg8QaFP0tEQs9MHuYob/XBw3Zx42dJoZYl
 tCjGP5oW7EvUdRD48GkgXP9DWA12QmDxNOHEmUdxWamsK88YQXFyWwb7uwV5x+hd
 mO3bJaYInkJsh3D2e5QARswQb+D5HMVYFwvEkxQF/wvmcMosRVz4vv65Sw==
 =P4uw
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "ARM64:

   - Fix pKVM error path on init, making sure we do not change critical
     system registers as we're about to fail

   - Make sure that the host's vector length is at capped by a value
     common to all CPUs

   - Fix kvm_has_feat*() handling of "negative" features, as the current
     code is pretty broken

   - Promote Joey to the status of official reviewer, while James steps
     down -- hopefully only temporarly

  x86:

   - Fix compilation with KVM_INTEL=KVM_AMD=n

   - Fix disabling KVM_X86_QUIRK_SLOT_ZAP_ALL when shadow MMU is in use

  Selftests:

   - Fix compilation on non-x86 architectures"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  x86/reboot: emergency callbacks are now registered by common KVM code
  KVM: x86: leave kvm.ko out of the build if no vendor module is requested
  KVM: x86/mmu: fix KVM_X86_QUIRK_SLOT_ZAP_ALL for shadow MMU
  KVM: arm64: Fix kvm_has_feat*() handling of negative features
  KVM: selftests: Fix build on architectures other than x86_64
  KVM: arm64: Another reviewer reshuffle
  KVM: arm64: Constrain the host to the maximum shared SVE VL with pKVM
  KVM: arm64: Fix __pkvm_init_vcpu cptr_el2 error path
2024-10-06 10:53:28 -07:00
Linus Torvalds
b3ce5c30a0 powerpc fixes for 6.12 #3
- Allow r30 to be used in vDSO code generation of getrandom.
 
 Thanks to: Jason A. Donenfeld.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRjvi15rv0TSTaE+SIF0oADX8seIQUCZwIxiwAKCRAF0oADX8se
 IbuQAQCzv/PrtxVkqQja5cTZeC/rrV4M1jIKsLpYe1voX3mDSAEA5NTime3l5VXm
 SdsiFUBVa4fzp8Ipu9r98wVEGtm/SQw=
 =ARIU
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:

 - Allow r30 to be used in vDSO code generation of getrandom

Thanks to Jason A. Donenfeld

* tag 'powerpc-6.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/vdso: allow r30 in vDSO code generation of getrandom
2024-10-06 10:43:00 -07:00
Aaron Thompson
82cb443089 kbuild: deb-pkg: Remove blank first line from maint scripts
The blank line causes execve() to fail:

  # strace ./postinst
  execve("./postinst", ...) = -1 ENOEXEC (Exec format error)
  strace: exec: Exec format error
  +++ exited with 1 +++

However running the scripts via shell does work (at least with bash)
because the shell attempts to execute the file as a shell script when
execve() fails.

Fixes: b611daae5e ("kbuild: deb-pkg: split image and debug objects staging out into functions")
Signed-off-by: Aaron Thompson <dev@aaront.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-10-07 02:36:38 +09:00
Xu Yang
d939881a15 kbuild: fix a typo dt_binding_schema -> dt_binding_schemas
If we follow "make help" to "make dt_binding_schema", we will see
below error:

$ make dt_binding_schema
make[1]: *** No rule to make target 'dt_binding_schema'.  Stop.
make: *** [Makefile:224: __sub-make] Error 2

It should be a typo. So this will fix it.

Fixes: 604a57ba97 ("dt-bindings: kbuild: Add separate target/dependency for processed-schema.json")
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-10-07 02:36:38 +09:00
Sami Tolvanen
c14a304682 scripts: import more list macros
Import list_is_first, list_is_last, list_replace, and list_replace_init.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-10-07 02:12:27 +09:00
Hans de Goede
2fae3129c0 platform/x86: x86-android-tablets: Fix use after free on platform_device_register() errors
x86_android_tablet_remove() frees the pdevs[] array, so it should not
be used after calling x86_android_tablet_remove().

When platform_device_register() fails, store the pdevs[x] PTR_ERR() value
into the local ret variable before calling x86_android_tablet_remove()
to avoid using pdevs[] after it has been freed.

Fixes: 5eba014120 ("platform/x86: x86-android-tablets: Add support for instantiating platform-devs")
Fixes: e2200d3f26 ("platform/x86: x86-android-tablets: Add gpio_keys support to x86_android_tablet_init()")
Cc: stable@vger.kernel.org
Reported-by: Aleksandr Burakov <a.burakov@rosalinux.ru>
Closes: https://lore.kernel.org/platform-driver-x86/20240917120458.7300-1-a.burakov@rosalinux.ru/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241005130545.64136-1-hdegoede@redhat.com
2024-10-06 12:50:50 +02:00