aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-01-26ASoC: cs42l43: Add pm_ptr around the power opsCharles Keepax1-1/+1
Add missing pm_ptr around the power ops. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-26ASoC: cs42l43: Check error from device_property_read_u32_array()Charles Keepax1-2/+7
Whilst reading cirrus,buttons-ohms the error from device_property_read_u32_array() is not checked, whilst there is a preceding device_property_count_u32() which is checked the property read can still fail. Add the missing check. Suggested-by: Andy Shevchenko <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-26ASoC: cs42l43: Minor code tidy upsCharles Keepax2-13/+9
Add some missing commas, refactor a couple small bits of code. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-26ASoC: cs42l43: Tidy up header includesCharles Keepax4-9/+26
Use more forward declarations, move header guards to cover other includes, and rely less on including headers through other headers. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-26ASoC: dt-bindings: samsung,tm2: Correct "audio-codec" constraintsRob Herring1-2/+5
The "audio-codec" constraints define how many entries(2), but not the size of each entry. Each entry is a single phandle. Define the size with an inner 'items' list. Signed-off-by: Rob Herring <[email protected]> Link: https://msgid.link/r/[email protected] Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2024-01-24ASoC: codecs: ES8326: Adding new volume kcontrolsZhu Ning2-2/+95
ES8326 features a headphone volume control register and four DAC volume control registers. We add new volume Kcontrols for these registers to enhance the configurability of the volume settings, providing users with greater flexibility. Signed-off-by: Zhu Ning <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-24ASoC: codecs: Remove unneeded semicolonYang Li1-2/+2
In the wcd939x codec driver, there are two instances where semicolons are used after closing braces of a switch-case statement. These semicolons are not required and do not adhere to the coding style guidelines. This patch removes the unnecessary semicolons at the end of the switch-case statements which cleans up the code and ensures consistency with the rest of the kernel coding style. Signed-off-by: Yang Li <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-24ASoC: Merge up fixes due to dependency with new changesMark Brown6-65/+153
Future ES8326 changes depend on already applied fixes, merge up the fixes so we can do the new things.
2024-01-23ASoC: codecs: Add support for the framer codecHerve Codina3-0/+430
The framer codec interacts with a framer. It allows to use some of the framer timeslots as audio channels to transport audio data over the framer E1/T1/J1 lines. It also reports line carrier detection events through the ALSA jack detection feature. Signed-off-by: Herve Codina <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: qcom: volume fixes and codec cleanupsMark Brown3-12/+5
Merge series from Johan Hovold <[email protected]>: To reduce the risk of speaker damage the PA gain needs to be limited on machines like the Lenovo Thinkpad X13s until we have active speaker protection in place. Limit the gain to the current default setting provided by the UCM configuration which most user have so far been using (due to a bug in the configuration files which prevented hardware volume control [1]). The wsa883x PA volume control also turned out to be broken, which meant that the default setting used by UCM configuration is actually the lowest level (-3 dB). With the codec driver fixed, hardware volume control also works as expected. Note that the new wsa884x driver most likely suffers from a similar bug, I'll send a fix for that once I've got that confirmed. Included is also a related fix for the LPASS WSA macro driver, which was changing the digital gain setting behind the back of user space and which can result in excessive (or too low) digital gain. There are further Qualcomm codec drivers that similarly appear to manipulate various gain settings, but on closer inspection it turns out that they only write back the current settings. Tests reveal that these writes are indeed needed for any prior updates to take effect (at least for the WSA and RX macros). [1] https://github.com/alsa-project/alsa-ucm-conf/pull/382
2024-01-22ASoC: codecs: fix ES8326 performance and pop noiseMark Brown2-48/+141
Merge series from Zhu Ning <[email protected]>: We get some issues regarding crosstalk, THD+N performance and pop noise from customer's project.
2024-01-22ASoC: use devm_snd_soc_register_card()Mark Brown3-23/+3
Merge series from Kuninori Morimoto <[email protected]>: These are v2 to use devm_snd_soc_register_card() on ASoC.
2024-01-22ASoC: dt-bindings: fsl-sai: Support Rx-only SAIAlexander Stein1-0/+2
On SoC like i.MX8QXP some SAI IP cores support only Rx path. Allow specifying only an Rx DMA channel, while omitting the Tx one. Signed-off-by: Alexander Stein <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: dt-bindings: fsl-sai: Add power-domainsAlexander Stein1-0/+3
Some SoC like i.MX8QXP use a power-domain for this IP, so add it to the supported properties. Signed-off-by: Alexander Stein <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: Support SAI and MICFIL on i.MX95 platformMark Brown3-4/+24
Merge series from Chancel Liu <[email protected]>: Support SAI and MICFIL on i.MX95 platform
2024-01-22ASoC: qcom: sc8280xp: limit speaker volumesJohan Hovold1-5/+7
The UCM configuration for the Lenovo ThinkPad X13s has up until now been setting the speaker PA volume to the minimum -3 dB when enabling the speakers, but this does not prevent the user from increasing the volume further. Limit the digital gain and PA volumes to a combined -3 dB in the machine driver to reduce the risk of speaker damage until we have active speaker protection in place (or higher safe levels have been established). Note that the PA volume limit cannot be set lower than 0 dB or PulseAudio gets confused when the first 16 levels all map to -3 dB. Also note that this will probably need to be generalised using machine-specific limits, but a common limit should do for now. Cc: <[email protected]> # 6.5 Signed-off-by: Johan Hovold <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: ES8326: Remove executable bitFei Shao1-0/+0
Remove the executable bit that was unintentionally turned on. Fixes: ee09084fbf9f ("ASoC: codecs: ES8326: Add chip version flag") Signed-off-by: Fei Shao <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: Merge up fixesMark Brown5-9/+25
To facilitate testing get our current fixes into the branch.
2024-01-22ASoC: codecs: add support for WCD939x CodecMark Brown12-95/+6597
Merge series from Neil Armstrong <[email protected]>: Add the main WCD9390/WCD9395 Audio Codec driver to support: - 4 ADC inputs for up to 5 Analog Microphones - 4 DMIC inputs for up to 8 Digital Microphones - 4 Microphone BIAS - Stereo Headphone output - Mono EAR output - MBHC engine for Headset Detection This adds: - bindings - MBHC changes to support Type-C muc - Soundwire Slave driver - Code driver The USB Mux subsystem support will be submitted separately since it's a functionally separate subsystem connected over I2C with it's own reset signal.
2024-01-22Improve SOF support for Steam Deck OLEDMark Brown5-43/+69
Merge series from Cristian Ciocaltea <[email protected]>: This patch series is a continuation of [1] to provide several fixes and improvements to the SOF drivers targeting the Vangogh platform, as found on Valve's Steam Deck OLED. The previous series only handled the legacy ACP drivers. Also note that, since v2, this patch series requires an updated SOF topology to provide a correct DAI link ID for the BT codec. The binary file should be located under: /usr/lib/firmware/amd/sof-tplg/sof-vangogh-nau8821-max.tplg Alternatively, as a temporary workaround, patch [2] can be used to adapt the driver to the broken topology. Another requirement to get this functional is patch [3] from v1, which has been dropped from the series to be upstreamed via the SOF development workflow. [1]: https://lore.kernel.org/all/[email protected]/ [2]: https://lore.kernel.org/all/[email protected]/ [3]: https://lore.kernel.org/all/[email protected]/
2024-01-22ASoC: allow up to eight CPU/codec DAIsKrzysztof Kozlowski1-1/+4
Sound card on Qualcomm X1E80100 CRD board will use eight DAIs in one DAI link, so increase the limit. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wcd934x: drop unneeded regulator includeKrzysztof Kozlowski1-1/+0
Driver does not use any regulator code, so drop redundant include of regulator/consumer.h header. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wcd938x: skip printing deferred probe failuersKrzysztof Kozlowski1-3/+1
Probe calls wcd938x_populate_dt_data() which already prints all the error cases with dev_err_probe(), so skip the additional dev_err(). Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wcd938x: handle deferred probeKrzysztof Kozlowski1-1/+1
WCD938x sound codec driver ignores return status of getting regulators and returns EINVAL instead of EPROBE_DEFER. If regulator provider probes after the codec, system is left without probed audio: wcd938x_codec audio-codec: wcd938x_probe: Fail to obtain platform data wcd938x_codec: probe of audio-codec failed with error -22 Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver") Cc: <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Add check for cpu dai link initializationVenkata Prasad Potturu1-2/+7
Add condition check for cpu dai link initialization for amplifier codec path, as same pcm id uses for both headset and speaker path for RENOIR platforms. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Update platform name for different boardsVenkata Prasad Potturu1-0/+4
Update platform name for various boards based on rembrandt and renoir platforms. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Enable rt5682s clocks in acp slave modeVenkata Prasad Potturu1-0/+7
Set and enable rt5682s codec bclk and lrclk rates when acp is in slave mode. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wcd938x: fix headphones volume controlsJohan Hovold1-1/+1
The lowest headphones volume setting does not mute so the leave the TLV mute flag unset. This is specifically needed to let the sound server use the lowest gain setting. Fixes: c03226ba15fe ("ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR") Cc: <[email protected]> # 6.5 Cc: Srinivas Kandagatla <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wcd9335: drop unused gain hack remnantJohan Hovold1-4/+0
The vendor driver appears to be modifying the gain settings behind the back of user space but these hacks never made it upstream except for some essentially dead code that adds a constant zero to the current gain setting on DAPM events. Note that the volume registers still need to be written after enabling clocks in order for any prior updates to take effect. Reviewed-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: lpass-wsa-macro: fix compander volume hackJohan Hovold1-7/+0
The LPASS WSA macro codec driver is updating the digital gain settings behind the back of user space on DAPM events if companding has been enabled. As compander control is exported to user space, this can result in the digital gain setting being incremented (or decremented) every time the sound server is started and the codec suspended depending on what the UCM configuration looks like. Soon enough playback will become distorted (or too quiet). This is specifically a problem on the Lenovo ThinkPad X13s as this bypasses the limit for the digital gain setting that has been set by the machine driver. Fix this by simply dropping the compander gain offset hack. If someone cares about modelling the impact of the compander setting this can possibly be done by exporting it as a volume control later. Note that the volume registers still need to be written after enabling clocks in order for any prior updates to take effect. Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route") Cc: [email protected] # 5.11 Cc: Srinivas Kandagatla <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: wsa883x: fix PA volume controlJohan Hovold1-1/+5
The PA gain can be set in steps of 1.5 dB from -3 dB to 18 dB, that is, in 15 levels. Fix the dB values for the PA volume control as experiments using wsa8835 show that the first 16 levels all map to the same lowest gain while the last three map to the highest gain. These values specifically need to be correct for the sound server to provide proper volume control. Note that level 0 (-3 dB) does not mute the PA so the mute flag should also not be set. Fixes: cdb09e623143 ("ASoC: codecs: wsa883x: add control, dapm widgets and map") Cc: [email protected] # 6.0 Cc: Srinivas Kandagatla <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: ES8326: fix the capture noise issueZhu Ning1-31/+32
We get a noise issue during the startup of recording. We update the register setting and dapm widgets to fix this issue. we change callback type of es8326_mute function to mute_stream. ES8326_ADC_MUTE is moved to es8326_mute function so it can be turned on at last and turned off at first. Signed-off-by: Zhu Ning <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: ES8326: Minimize the pop noise on headphoneZhu Ning1-16/+20
We modify the register settings to minimize headphone pop noise during ES8326 power-up and music start/stop. Signed-off-by: Zhu Ning <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: ES8326: Improving the THD+N performanceZhu Ning2-9/+14
We update the values of some registers in the initialization sequence in es8326_resume function to improve THD+N performance. THD+N performance decreases if the output level on headphone is close to full scale. So we change the register setting in es8326_jack_detect_handler function to improve THD+N performance if headphone pulgged. Also, the register setting should be restored when the headset is unplugged Signed-off-by: Zhu Ning <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: ES8326: improving crosstalk performanceZhu Ning2-0/+83
We change the crosstalk parameter in es8326_resume function to improve crosstalk performance. Adding crosstalk kcontrol to enhance the flexibility of crosstalk debugging in machine. Adding ES8326_DAC_CROSSTALK macro to declare the crosstalk register. Signed-off-by: Zhu Ning <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: ti: j721e-evm: Use devm_kcalloc() instead of devm_kzalloc()Erick Archer1-2/+2
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Reviewed-by: Gustavo A. R. Silva <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Signed-off-by: Erick Archer <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: nau8540: Add pre-charge actions for inputDavid Lin2-37/+92
Adding pre-charge mechanism to make FEPGA power stable faster. It not only improved the recording quality at the beginning but also meaningfully decreased the final adc delay time. Signed-off-by: David Lin <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: p1022_rdk: fix all kernel-doc warningsRandy Dunlap1-9/+24
Fix several kernel-doc warnings in p1022_rdk.c: p1022_rdk.c:70: warning: cannot understand function prototype: 'struct machine_data ' p1022_rdk.c:90: warning: Function parameter or struct member 'card' not described in 'p1022_rdk_machine_probe' p1022_rdk.c:90: warning: No description found for return value of 'p1022_rdk_machine_probe' p1022_rdk.c:129: warning: Function parameter or struct member 'substream' not described in 'p1022_rdk_startup' p1022_rdk.c:129: warning: No description found for return value of 'p1022_rdk_startup' p1022_rdk.c:162: warning: Function parameter or struct member 'card' not described in 'p1022_rdk_machine_remove' p1022_rdk.c:162: warning: No description found for return value of 'p1022_rdk_machine_remove' p1022_rdk.c:187: warning: cannot understand function prototype: 'const struct snd_soc_ops p1022_rdk_ops = ' p1022_rdk.c:199: warning: Function parameter or struct member 'pdev' not described in 'p1022_rdk_probe' p1022_rdk.c:199: warning: No description found for return value of 'p1022_rdk_probe' p1022_rdk.c:349: warning: Function parameter or struct member 'pdev' not described in 'p1022_rdk_remove' p1022_rdk.c:376: warning: No description found for return value of 'p1022_rdk_init' Signed-off-by: Randy Dunlap <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Cc: <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: dt-bindings: Do not override firmware-name $refKrzysztof Kozlowski2-3/+3
dtschema package defines firmware-name as string-array, so individual bindings should not make it a string but instead just narrow the number of expected firmware file names. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: qcom: Use devm_kcalloc() instead of devm_kzalloc()Erick Archer1-1/+1
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: SOF: amd: Compute file paths on firmware loadCristian Ciocaltea2-11/+28
Commit 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") changed the order of some operations and the firmware paths are not available anymore at snd_sof_probe() time. Precisely, fw_filename_prefix is set by sof_select_ipc_and_paths() via plat_data->fw_filename_prefix = out_profile.fw_path; but sof_init_environment() which calls this function was moved from snd_sof_device_probe() to sof_probe_continue(). Moreover, snd_sof_probe() was moved from sof_probe_continue() to sof_init_environment(), but before the call to sof_select_ipc_and_paths(). The problem here is that amd_sof_acp_probe() uses fw_filename_prefix to compute fw_code_bin and fw_data_bin paths, and because the field is not yet initialized, the paths end up containing (null): snd_sof_amd_vangogh 0000:04:00.5: Direct firmware load for (null)/sof-vangogh-code.bin failed with error -2 snd_sof_amd_vangogh 0000:04:00.5: sof signed firmware code bin is missing snd_sof_amd_vangogh 0000:04:00.5: error: failed to load DSP firmware -2 snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2 Move usage of fw_filename_prefix right before request_firmware() calls in acp_sof_load_signed_firmware(). Fixes: 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: SOF: core: Skip firmware test for custom loadersCristian Ciocaltea1-3/+15
The ACP driver for Vangogh platform uses a quirk for Valve Galileo device to setup a custom firmware loader, which neither requires nor uses the firmware file indicated via the default_fw_filename member of struct sof_dev_desc. Since commit 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing"), the provided filename gets verified and triggers a fatal error on probe: [ 7.719337] snd_sof_amd_vangogh 0000:04:00.5: enabling device (0000 -> 0002) [ 7.721486] snd_sof_amd_vangogh 0000:04:00.5: SOF firmware and/or topology file not found. [ 7.721565] snd_sof_amd_vangogh 0000:04:00.5: Supported default profiles [ 7.721569] snd_sof_amd_vangogh 0000:04:00.5: - ipc type 0 (Requested): [ 7.721573] snd_sof_amd_vangogh 0000:04:00.5: Firmware file: amd/sof/sof-vangogh.ri [ 7.721577] snd_sof_amd_vangogh 0000:04:00.5: Topology file: amd/sof-tplg/sof-vangogh-nau8821-max.tplg [ 7.721582] snd_sof_amd_vangogh 0000:04:00.5: Check if you have 'sof-firmware' package installed. [ 7.721585] snd_sof_amd_vangogh 0000:04:00.5: Optionally it can be manually downloaded from: [ 7.721589] snd_sof_amd_vangogh 0000:04:00.5: https://github.com/thesofproject/sof-bin/ [ 7.721997] snd_sof_amd_vangogh: probe of 0000:04:00.5 failed with error -2 According to AMD, a combined ".ri" file which includes the code and data segments cannot be used due to a limitation preventing the code image to be signed on build time. Fix the issue by skipping the firmware file test if a custom loader is being used instead of the generic one. Fixes: 6c393ebbd74a ("ASoC: SOF: core: Implement IPC version fallback if firmware files are missing") Co-developed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Péter Ujfalusi <[email protected]> Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: SOF: amd: Optimize quirk for Valve GalileoCristian Ciocaltea1-2/+1
Valve's Steam Deck OLED is uniquely identified by vendor and product name (Galileo) DMI fields. Simplify the quirk by removing the unnecessary match on product family. Additionally, fix the related comment as it points to the old product variant. Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: SOF: amd: Fix memory leak in amd_sof_acp_probe()Cristian Ciocaltea1-9/+19
Driver uses kasprintf() to initialize fw_{code,data}_bin members of struct acp_dev_data, but kfree() is never called to deallocate the memory, which results in a memory leak. Fix the issue by switching to devm_kasprintf(). Additionally, ensure the allocation was successful by checking the pointer validity. Fixes: f7da88003c53 ("ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Update MODULE_DESCRIPTION for sof-machCristian Ciocaltea1-1/+1
The current MODULE_DESCRIPTION relates to a Chrome board, as that was what the driver initially supported. Nonetheless, it has since progressed incrementally and evolved into a more comprehensive machine driver. Hence, update MODULE_DESCRIPTION to better reflect this. Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Add missing error handling in sof-machCristian Ciocaltea1-8/+6
Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine driver's probe function. Note there is no need for an undo. While at it, switch to dev_err_probe(). Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Make use of existing *_CODEC_DAI macrosCristian Ciocaltea1-3/+3
The generic ACP machine driver provides macros for NAU88221 and MAX98388 codec DAI names, but in places it is still using directly the related strings. For consistency, replace all strings with the equivalent macros. Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: amd: acp: Drop redundant initialization of machine driver dataCristian Ciocaltea1-10/+0
Simplify driver data configuration by removing redundant initialization of members in static structs. Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: Add WCD939x Codec driverNeil Armstrong4-0/+3702
Add the main WCD9390/WCD9395 Audio Codec driver to support: - 4 ADC inputs for up to 5 Analog Microphones - 4 DMIC inputs for up to 8 Digital Microphones - 4 Microphone BIAS - Stereo Headphone output - Mono EAR output - MBHC engine for Headset Detection It makes usage of the generic MBHC and CLSH generic code and the USB Type-C mux and switch helpers to gather USB-C Events in order to properly setup Headset Detection mechanism when connected behind the separate USB-C Mux subsystem. WCD9390/WCD9395 supports a PCM path for Playback instead of the actually implemented PDM playback, it will be implemented later. Signed-off-by: Neil Armstrong <[email protected]> Link: https://msgid.link/r/20231219-topic-sm8650-upstream-wcd939x-codec-v4-5-1c3bbff2d7ab@linaro.org Signed-off-by: Mark Brown <[email protected]>
2024-01-22ASoC: codecs: Add WCD939x Soundwire devices driverNeil Armstrong4-0/+2551
Add Soundwire Slave driver for the WCD9390/WCD9395 Audio Codec. The WCD9390/WCD9395 Soundwire devices will be used by the main WCD9390/WCD9395 Audio Codec driver to access registers and configure Soundwire RX and TX ports. Signed-off-by: Neil Armstrong <[email protected]> Link: https://msgid.link/r/20231219-topic-sm8650-upstream-wcd939x-codec-v4-4-1c3bbff2d7ab@linaro.org Signed-off-by: Mark Brown <[email protected]>