aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-30ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUSMarios Levogiannis1-0/+10
Set microphone pins 0x18 (rear) and 0x19 (front) to VREF_50 to fix the microphone noise on ASUS TUF B550M-PLUS which uses the ALCS1200A codec. The initial value was VREF_80. The same issue is also present on Windows using both the default Windows driver and all tested Realtek drivers before version 6.0.9049.1. Comparing Realtek driver 6.0.9049.1 (the first one without the microphone noise) to Realtek driver 6.0.9047.1 (the last one with the microphone noise) revealed that the fix is the result of setting pins 0x18 and 0x19 to VREF_50. This fix may also work for other boards that have been reported to have the same microphone issue and use the ALC1150 and ALCS1200A codecs, since these codecs are similar and the fix in the Realtek driver on Windows is common for both. However, it is currently enabled only for ASUS TUF B550M-PLUS as this is the only board that could be tested. Signed-off-by: Marios Levogiannis <marios.levogiannis@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220530074131.12258-1-marios.levogiannis@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-27ALSA: hda/via: Delete does not require returnXiang wangx1-2/+0
Void function return statements are not generally useful. Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220527121059.25221-1-wangxiang@cdjrlc.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-27ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptopRik van der Kemp1-0/+1
The 2022-model XPS 15 appears to use the same 4-speakers-on-ALC289 audio setup as the Dell XPS 15 9510, so requires the same quirk to enable woofer output. Tested on my own 9520. [ Move the entry to the right position in the SSID order -- tiwai ] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216035 Cc: <stable@vger.kernel.org> Signed-off-by: Rik van der Kemp <rik@upto11.nl> Link: https://lore.kernel.org/r/181056a137b.d14baf90133058.8425453735588429828@upto11.nl Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-24ALSA: hda/realtek - Add new type for ALC245Kailang Yang1-2/+8
Add new type for ALC245. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/cef26a7cd3d146eb96a3994ce79e34d2@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-23ALSA: ctxfi: fix typo in commentJulia Lawall1-1/+1
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-44-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-23ALSA: cs5535audio: fix typo in commentJulia Lawall1-1/+1
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-1-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-23ALSA: ctxfi: Add SB046x PCI IDEdward Matijevic2-1/+4
Adds the PCI ID for X-Fi cards sold under the Platnum and XtremeMusic names Before: snd_ctxfi 0000:05:05.0: chip 20K1 model Unknown (1102:0021) is found After: snd_ctxfi 0000:05:05.0: chip 20K1 model SB046x (1102:0021) is found [ This is only about defining the model name string, and the rest is handled just like before, as a default unknown device. Edward confirmed that the stuff has been working fine -- tiwai ] Signed-off-by: Edward Matijevic <motolav@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/cae7d1a4-8bd9-7dfe-7427-db7e766f7272@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-23Merge branch 'for-linus' into for-nextTakashi Iwai3-16/+92
Merge for 5.18-rc1 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-21ALSA: lola: Bounds check loop iterator against streams array sizeKees Cook1-1/+2
GCC 12 sees that it's technically possible for num_streams to be larger than ARRAY_SIZE(pcm->streams). Bounds-check the iterator. ../sound/pci/lola/lola_pcm.c: In function 'lola_pcm_update': ../sound/pci/lola/lola_pcm.c:567:64: warning: array subscript [0, 31] is outside array bounds of 'struct lola_stream[16]' [-Warray-bounds] 567 | struct lola_stream *str = &pcm->streams[i]; | ~~~~~~~~~~~~^~~ In file included from ../sound/pci/lola/lola_pcm.c:15: ../sound/pci/lola/lola.h:307:28: note: while referencing 'streams' 307 | struct lola_stream streams[MAX_STREAM_COUNT]; | ^~~~~~~ Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220520165537.2139826-1-keescook@chromium.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Add Amp Name based on channel and indexStefan Binding2-0/+19
This will be used to identify ALSA controls and firmware. The Amp Name will be a channel identifier (L or R), and an index, which identifies which amp for that channel. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Enable GPIO2 Interrupt for CLSA0100 laptopsStefan Binding1-0/+2
CLSA0100 Laptop does not contain configuration inside ACPI, instead the hardware configuration needs to be hardcoded. Hardcode GPIO2 Interrupt in the driver for CSLA0100. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-6-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Add Support for InterruptsStefan Binding3-1/+137
The CS35L41 can produce interrupts on error. When the interrupts occur, the driver will report the error, but errors will only be fixed after playback finishes. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Remove Set Channel Map api from bindingStefan Binding3-56/+1
This API was required for CLSA0100 laptop, which did not have correct properties inside ACPI. The required values are now hardcoded inside the driver so this is no longer needed. Without this api, there CLSA0100 can now use the generic cs35l41 fixup, like the other laptops. All other laptops will read the Speaker Position from ACPI and set the channel map from within the driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Set Speaker Position for CLSA0100 LaptopStefan Binding1-0/+1
This laptop does not contain required properties inside ACPI, instead the values are be hardcoded inside the driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda: cs35l41: Fix error in spi cs35l41 hda driver nameStefan Binding1-1/+1
For consistency, rename spi cs35l41 hda driver name so that it matches i2c. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220509214703.4482-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-16ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machineAndy Chi1-0/+1
The HP EliteBook 630 is using ALC236 codec which used 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220513121648.28584-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-13ALSA: hda/realtek: Add quirk for TongFang devices with pop noiseWerner Sembach1-0/+8
When audio stops playing there is an audible "pop"-noise when using headphones on the TongFang GMxMRxx, GKxNRxx, GMxZGxx, GMxTGxx and GMxAGxx. This quirk fixes this mostly. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220512180956.281804-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-12ALSA: hda/cs8409: Add Speaker Playback Switch for WarlockStefan Binding2-0/+3
Add support for a Speaker Playback Switch, which disables the Amp connected to cs8409. The Switch is not added automatically because cs8409 does not have an output amp for the speaker NID. Note: This switch uses a different GPIO to Cyborg/Odin variants Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220511100207.1268321-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-12ALSA: hda/cs8409: Add Speaker Playback Switch for CyborgStefan Binding2-11/+64
Add support for a Speaker Playback Switch, which disables the Amp connected to cs8409. The Switch is not added automatically because cs8409 does not have an output amp for the speaker NID. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220511100207.1268321-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-12ALSA: hda/cs8409: Support new Odin VariantsStefan Binding3-3/+29
Odin Variants have the internal mic connected directly to the CPU rather than codec. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220511100207.1268321-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-11ALSA: hda/realtek: Add quirk for the Framework LaptopDustin L. Howett1-0/+11
Some board revisions of the Framework Laptop have an ALC295 with a disconnected or faulty headset mic presence detect. The "dell-headset-multi" fixup addresses this issue, but also enables an inoperative "Headphone Mic" input device whenever a headset is connected. Adding a new quirk chain specific to the Framework Laptop resolves this issue. The one introduced here is based on the System76 "no headphone mic" quirk chain. The VID:PID f111:0001 have been allocated to Framework Computer for this board revision. Revision history: - v2: Moved to a custom quirk chain to suppress the "Headphone Mic" pincfg. Signed-off-by: Dustin L. Howett <dustin@howett.net> Link: https://lore.kernel.org/r/20220511010759.3554-1-dustin@howett.net Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-09ALSA: hda/cs8409: Support manual mode detection for CS42L42Stefan Binding3-31/+132
For Jack detection on CS42L42, detection is normally done using "auto" mode, which automatically detects what type of jack is connected to the device. However, some headsets are not automatically detected, and as such and alternative detection method "manual mode" can be used to detect these headsets. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Tested-by: Chris Chiu <chris.chiu@canonical.com> Link: https://lore.kernel.org/r/20220504161236.2490532-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-09ALSA: hda/cs8409: Use general cs42l42 include in cs8409 hda driverStefan Binding3-231/+229
This is to improve maintainability of the driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220504161236.2490532-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-09ALSA: hdsp: remove redundant assignment to pointer kctlColin Ian King1-1/+1
Pointer kctl is being assigned a value that is not being read, buf is being re-assigned later. The assignment is redundant and can be removed. Cleans up clang scan build warning: sound/pci/rme9652/hdsp.c:3317:28: warning: Although the value stored to 'kctl' is used in the enclosing expression, the value is never actually read from 'kctl' [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220508212819.59188-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-08ALSA: hda/realtek: Add quirk for Dell Latitude 7520Gabriele Mazzotta1-0/+43
The driver is currently using ALC269_FIXUP_DELL4_MIC_NO_PRESENCE for the Latitude 7520, but this fixup chain has some issues: - The internal mic is really loud and the recorded audio is distorted at "standard" audio levels. - There are pop noises at system startup and when plugging/unplugging headphone jacks. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215885 Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Link: https://lore.kernel.org/r/20220501124237.4667-1-gabriele.mzt@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-08ALSA: hda - fix unused Realtek function when PM is not enabledRandy Dunlap1-5/+3
When CONFIG_PM is not enabled, alc_shutup() is not needed, so move it inside the #ifdef CONFIG_PM guard. Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity. Fixes this build warning: sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup' Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20220430193318.29024-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-05-08ALSA: hda/conexant: add a new hda codec SN6140bo liu1-0/+1
The current kernel does not support the SN6140 codec chip. Add the SN6140 codec configuration item to kernel. Signed-off-by: bo liu <bo.liu@senarytech.com> Link: https://lore.kernel.org/r/20220506025735.17731-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-25ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakersZihao Wang1-0/+1
Lenovo Yoga Duet 7 13ITL6 has Realtek ALC287 and built-in speakers do not work out of the box. The fix developed for Yoga 7i 14ITL5 also enables speaker output for this model. Signed-off-by: Zihao Wang <wzhd@ustc.edu> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220424084120.74125-1-wzhd@ustc.edu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-22ALSA: hda/realtek: Enable mute/micmute LEDs support for HP LaptopsAndy Chi1-6/+6
On HP Laptops, requires the same ALC285_FIXUP_HP_GPIO_LED quirk to make its audio LEDs work. So apply the quirk, and make it the last one since it's an LED quirk. Signed-off-by: Andy Chi <andy.chi@canonical.com> Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops") Link: https://lore.kernel.org/r/20220422090845.230071-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-22ALSA: hda/realtek: Fix mute led issue on thinkpad with cs35l41 s-codecHui Wang1-0/+2
The quirk ALC287_FIXUP_CS35L41_I2C_2 needs to chain the quirk ALC269_FIXUP_THINKPAD_ACPI, otherwise the mute led will not work if a thinkpad machine applies that quirk. And it will be safe if non-thinkpad machines apply that quirk since hda_fixup_thinkpad_acpi() will check and return in this case. Fixes: ae7abe36e352e ("ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops") Signed-off-by: Hui Wang <hui.wang@canonical.com> Link: https://lore.kernel.org/r/20220422073937.10073-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-21ALSA: hda/realtek: Add quirk for Clevo NP70PNPTim Crawford1-0/+1
Fixes headset detection on Clevo NP70PNP. Signed-off-by: Tim Crawford <tcrawford@system76.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220421170412.3697-1-tcrawford@system76.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-21ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845/865 G9Andy Chi1-2/+9
On HP EliteBook 845 G9 and EliteBook 865 G9, the audio LEDs can be enabled by ALC285_FIXUP_HP_MUTE_LED. So use it accordingly. Signed-off-by: Andy Chi <andy.chi@canonical.com> Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops") Link: https://lore.kernel.org/r/20220421063606.39772-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-19Merge tag 'asoc-fix-v5.18-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai3-13/+6
ASoC: Fixes for v5.18 A collection of fixes that came in since the merge window, plus one new device ID for an x86 laptop. Nothing that really stands out with particularly big impact outside of the affected device.
2022-04-15ALSA: hda/hdmi: add HDMI codec VID for Raptorlake-PKai Vehmanen1-0/+1
Add HDMI codec VID for Intel Raptorlake-P platform. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220414160129.3641411-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-15ALSA: hda/hdmi: fix warning about PCM count when used with SOFKai Vehmanen1-2/+4
With commit 13046370c4d1 ("ALSA: hda/hdmi: let new platforms assign the pcm slot dynamically"), old behaviour to consider the HDA pin number, when choosing PCM to assign, was dropped. Build on this change and limit the number of PCMs created to number of converters (= maximum number of concurrent display/receivers) when "mst_no_extra_pcms" and "dyn_pcm_no_legacy" quirks are both set. Fix the check in hdmi_find_pcm_slot() to ensure only spec->pcm_used entries are considered in the search. Elsewhere in the driver spec->pcm_used is already checked properly. Doing this avoids following warning at SOF driver probe for multiple machine drivers: [ 112.425297] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4 [ 112.425298] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 5 [ 112.425299] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 6 Fixes: 13046370c4d1 ("ALSA: hda/hdmi: let new platforms assign the pcm slot dynamically") BugLink: https://github.com/thesofproject/linux/issues/2573 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220414150516.3638283-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13Merge branch 'for-linus' into for-nextTakashi Iwai40-73/+290
Back-merge the 5.18-rc3 devel branch, as it influences on the further development. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13Merge branch 'topic/cs35l41' into for-nextTakashi Iwai5-245/+96
Pull CS35L41 codec updates Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Move external boost handling to lib for ASoC useLucas Tanure1-112/+7
To add support for external boost for ASoC move the HDA external boost implementation to the shared lib. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-15-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Handle all external boost setups the same wayLucas Tanure1-36/+24
External boost enables sequences for devices with or without GPIO1 as VSPK switch are the same if devices are put in safe mode from reset. As a previous patch put all external boost devices into safe mode from reset, all external boost devices can be handled in the same way for stream open and close. The only difference is that devices without an VSPK switch can not be put in reset and devices with it can be put into reset if a configuration is applied. The function cs35l41_hda_safe_reset is created to handle the safe reset of the chip, and as systems without VSPK switch are not supported anymore, only the CS35L41 HDA driver should check its return. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-14-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Reorganize log for playback actionsLucas Tanure1-8/+7
For each case, only log the last regmap access, so it doesn't get overwritten, and as all regmap access should show the same issues logging the last one should be enough. Change to dev_err to log this error. Also, differentiate between a regmap access failure and invalid playback action. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-13-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Remove cs35l41_hda_reg_sequence structLucas Tanure2-60/+33
Remove cs35l41_hd_reg_sequence as it adds a layer of flexibility not needed. As cs35l41_hda_(start/stop)_bst is a single register, it can be replaced by regmap_update_bits with usleep_range to wait for the same 3000us that reg_sequence had. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-12-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Move boost config to initialization codeLucas Tanure1-5/+8
Having CS35L41_PWR_CTRL2 on cs35l41_hda_config overwrites the boost configuration for internal boost. So move it to the initialization part and use regmap_update_bits to only change the correct bits. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-11-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Mute the device before shutdownLucas Tanure1-1/+6
Mute the device before shutdown to avoid pops and clicks for all types of boost. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-9-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Put the device into safe mode for external boostLucas Tanure1-5/+8
To facilitate the configuration of external boost devices, put all devices, with or without VSPK switch, into safe mode from the start. That allows the following parts of the driver to handle all external boost devices in the same way. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-8-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Add Boost type flagLucas Tanure1-19/+24
Replace vspk_always_on by a enum that better characterizes the boost type, as there is 3 types of boost hardware. And with the new boost type other parts of the driver can better handle the configuration of the chip. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-7-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Always configure the DAILucas Tanure1-8/+2
The dai configuration is always the same and should always configured during the opening the stream. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-6-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: hda: cs35l41: Fix I2S params commentsLucas Tanure1-2/+2
Fix clock and slot size comments Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-5-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: cs35l41: Move cs35l41_gpio_config to shared libLucas Tanure1-6/+5
ASoC and HDA can use a single function to configure the chip gpios. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-4-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: cs35l41: Check hw_config before using itLucas Tanure1-27/+43
The driver can receive an empty hw_config, so mark as valid if successfully read from device tree/ACPI or set by the driver itself. Platforms not marked with a valid hw config will not be supported. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-3-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-13ALSA: cs35l41: Unify hardware configurationLucas Tanure2-52/+30
Both ASoC and HDA require to configure the GPIOs and Boost, so create a single shared struct for hardware configuration. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220413083728.10730-2-tanureal@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>