summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
2025-03-03ASoC: codec: cs35l33: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87jz9dfq4u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs35l32: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ldttfq4y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs530x: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87mse9fq56.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs4341: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o6ypfq5a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs4271: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87plj5fq5e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs4270: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87r03lfq5j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs4265: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87seo1fq5n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codec: cs4234: use inclusive language for SND_SOC_DAIFMT_CBx_CFxKuninori Morimoto
In SND_SOC_DAIFMT_CBx_CFx, M/S are no longer used. use P/C. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87tt8hfq5r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5677: Update definition of device_id tablesCezary Rojewski
Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table. While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-23-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt298: Update definition of device_id tablesCezary Rojewski
Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table. While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-22-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt286: Update definition of device_id tablesCezary Rojewski
Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table. While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-21-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5682: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-20-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5670: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-19-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5668: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-18-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5665: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-17-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5663: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5660: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5659: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5651: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5645: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5640: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. While at it, sort the IDs alphabetically. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt5514: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt274: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1318: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1308: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1305: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1019: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1016: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1015: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-03-03ASoC: codecs: rt1011: Fix definition of device_id tablesCezary Rojewski
There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250226112612.166989-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-28Convert sound drivers to use devm_kmemdup_array()Mark Brown
Merge series from Raag Jadav <raag.jadav@intel.com>: This series converts sound drivers to use the newly introduced[1] devm_kmemdup_array() helper. [1] https://lore.kernel.org/r/20250212062513.2254767-1-raag.jadav@intel.com
2025-02-28ASoC: uda1380: use devm_kmemdup_array()Raag Jadav
Convert to use devm_kmemdup_array() and while at it, make the size robust against type changes. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20250228062812.150004-5-raag.jadav@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-28ASoC: tlv320dac33: use devm_kmemdup_array()Raag Jadav
Convert to use devm_kmemdup_array() and while at it, make the size robust against type changes. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20250228062812.150004-4-raag.jadav@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-28ASoC: hdac_hdmi: use devm_kmemdup_array()Raag Jadav
Convert to use devm_kmemdup_array() and while at it, make the size robust against type changes. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20250228062812.150004-3-raag.jadav@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-26ASoC: tas2781: Clean up for some defineBaojun Xu
Do some clean up for some define in header file. Like change lower case in value, up case in define, space add in recommends, change date of files and add author. Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20250226144328.11645-1-baojun.xu@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-26ASoC: rt712-sdca: Add FU05 playback switch controlShuming Fan
Because there is no playback switch control for rt712-sdw headphone endpoint, it causes there is no way to control HP on and off in ALSA UCM config. Signed-off-by: derek.fang <derek.fang@realtek.com> Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250226084728.1889082-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25ASoC: cs35l56: Prevent races when soft-resetting using SPI controlRichard Fitzgerald
When SPI is used for control, the driver must hold the SPI bus lock while issuing the sequence of writes to perform a soft reset. >From the time the driver writes the SYSTEM_RESET command until the driver does a write to terminate the reset, there must not be any activity on the SPI bus lines. If there is any SPI activity during the soft-reset, another soft-reset will be triggered. The state of the SPI chip select is irrelevant. A repeated soft-reset does not in itself cause any problems, and it is not an infinite loop. The problem is a race between these resets and the driver polling for boot completion. There is a time window between soft resets where the driver could read HALO_STATE as 2 (fully booted) while the chip is actually soft-resetting. Although this window is small, it is long enough that it is possible to hit it in normal operation. To prevent this race and ensure the chip really is fully booted, the driver calls spi_bus_lock() to prevent other activity while resetting. It then issues the SYSTEM_RESET mailbox command. After allowing sufficient time for reset to take effect, the driver issues a PING mailbox command, which will force completion of the full soft-reset sequence. The SPI bus lock can then be released. The mailbox is checked for any boot or wakeup response from the firmware, before the value in HALO_STATE will be trusted. This does not affect SoundWire or I2C control. Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250225131843.113752-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-25Merge tag 'v6.14-rc4' into drm-nextDave Airlie
Backmerge Linux 6.14-rc4 at the request of tzimmermann so misc-next can base on rc4. Signed-off-by: Dave Airlie <airlied@redhat.com>
2025-02-24ASoC: cros_ec_codec: Use str_enable_disable() helper in wov_enable_put()Thorsten Blum
Remove hard-coded strings by using the str_enable_disable() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://patch.msgid.link/20250220120100.1530-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-24ASoC: es8328: fix route from DAC to outputNicolas Frattaroli
The ES8328 codec driver, which is also used for the ES8388 chip that appears to have an identical register map, claims that the output can either take the route from DAC->Mixer->Output or through DAC->Output directly. To the best of what I could find, this is not true, and creates problems. Without DACCONTROL17 bit index 7 set for the left channel, as well as DACCONTROL20 bit index 7 set for the right channel, I cannot get any analog audio out on Left Out 2 and Right Out 2 respectively, despite the DAPM routes claiming that this should be possible. Furthermore, the same is the case for Left Out 1 and Right Out 1, showing that those two don't have a direct route from DAC to output bypassing the mixer either. Those control bits toggle whether the DACs are fed (stale bread?) into their respective mixers. If one "unmutes" the mixer controls in alsamixer, then sure, the audio output works, but if it doesn't work without the mixer being fed the DAC input then evidently it's not a direct output from the DAC. ES8328/ES8388 are seemingly not alone in this. ES8323, which uses a separate driver for what appears to be a very similar register map, simply flips those two bits on in its probe function, and then pretends there is no power management whatsoever for the individual controls. Fair enough. My theory as to why nobody has noticed this up to this point is that everyone just assumes it's their fault when they had to unmute an additional control in ALSA. Fix this in the es8328 driver by removing the erroneous direct route, then get rid of the playback switch controls and have those bits tied to the mixer's widget instead, which until now had no register to play with. Fixes: 567e4f98922c ("ASoC: add es8328 codec driver") Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Link: https://patch.msgid.link/20250222-es8328-route-bludgeoning-v1-1-99bfb7fb22d9@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-18ASoC: tas2764: Set the SDOUT polarity correctlyHector Martin
TX launch polarity needs to be the opposite of RX capture polarity, to generate the right bit slot alignment. Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-28-932760fd7e07@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-18ASoC: tas2764: Fix power control maskHector Martin
Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-1-932760fd7e07@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-17ASoC: tas2764: Random patches from the Asahi LinuxMark Brown
Merge series from broonie@kernel.org: This is a random subset of the patches for the tas2764 driver that I found in the Asahi Linux tree which seemed to be clear fixes and improvements which apply easily to mainline without much effort, there's a bunch more work on the driver that should also be applicable. I've only build tested this.
2025-02-17ASoC: wm_hubs: Use str_enable_disable() in wm_hubs_update_class_w()Thorsten Blum
Remove hard-coded strings by using the str_enable_disable() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250210115804.53504-3-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-16ASoC: tas2770: Fix volume scaleHector Martin
The scale starts at -100dB, not -128dB. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250208-asoc-tas2770-v1-1-cf50ff1d59a3@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-16ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFGHector Martin
Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250208-asoc-tas2764-v1-4-dbab892a69b5@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-16ASoC: tas2764: Mark SW_RESET as volatileHector Martin
Since the bit is self-clearing. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250208-asoc-tas2764-v1-3-dbab892a69b5@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-16ASoC: tas2764: Wait for ramp-down after shutdownHector Martin
When we shut down the amp, we need to wait for the built-in ramp-down before we can remove the TDM clocks. There is no documented status regiter to poll, so the best we can do is a delay. Datasheet says 5.9ms for ramp-down and 1.5ms between shutdown and next startup, so let's do 6ms after mute and 2ms after shutdown. That gives us a cumulative 8ms for ramp-down and guaratees the required minimum shutdown time. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250208-asoc-tas2764-v1-2-dbab892a69b5@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-16ASoC: tas2764: Power up/down amp on mute opsHector Martin
The ASoC convention is that clocks are removed after codec mute, and power up/down is more about top level power management. For these chips, the "mute" state still expects a TDM clock, and yanking the clock in this state will trigger clock errors. So, do the full shutdown<->mute<->active transition on the mute operation, so the amp is in software shutdown by the time the clocks are removed. This fixes TDM clock errors when streams are stopped. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250208-asoc-tas2764-v1-1-dbab892a69b5@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-02-13gpiolib: add gpiod_multi_set_value_cansleepMark Brown
Merge series from David Lechner <dlechner@baylibre.com>: This series was inspired by some minor annoyance I have experienced a few times in recent reviews. Calling gpiod_set_array_value_cansleep() can be quite verbose due to having so many parameters. In most cases, we already have a struct gpio_descs that contains the first 3 parameters so we end up with 3 (or often even 6) pointer indirections at each call site. Also, people have a tendency to want to hard-code the first argument instead of using struct gpio_descs.ndescs, often without checking that ndescs >= the hard-coded value. So I'm proposing that we add a gpiod_multi_set_value_cansleep() function that is a wrapper around gpiod_set_array_value_cansleep() that has struct gpio_descs as the first parameter to make it a bit easier to read the code and avoid the hard-coding temptation. I've just done gpiod_multi_set_value_cansleep() for now since there were over 10 callers of this one. There aren't as many callers of the get and atomic variants, but we can add those too if this seems like a useful thing to do. Maintainers, if you prefer to have this go through the gpio tree, please give your Acked-by:. Several maintainers have also requested an immutable branch, so I expect that will be made available. And if there is anything leftover after the next kernel release, I will resend it.