- 16 May, 2022 3 commits
-
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 12 May, 2022 5 commits
-
-
Daniel Kaehn authored
Generic serial MIDI driver adding support for using serial devices compatible with the serial bus as raw MIDI devices, allowing using additional serial devices not compatible with the existing serial-u16550 driver. Supports only setting standard serial baudrates on the underlying serial device; however, the underlying serial device can be configured so that a requested 38.4 kBaud is actually the standard MIDI 31.25 kBaud. Supports DeviceTree configuration. Signed-off-by: Daniel Kaehn <kaehndan@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220509145933.1161526-3-kaehndan@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Daniel Kaehn authored
Adds dt-binding for a Generic MIDI Interface using a serial device. Signed-off-by: Daniel Kaehn <kaehndan@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220509145933.1161526-2-kaehndan@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 09 May, 2022 4 commits
-
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
This is to allow the hda driver to have access to the register names, for improved maintainability. Also ensure new header is aligned to 100 columns. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220504161236.2490532-2-sbinding@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Colin Ian King authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 08 May, 2022 1 commit
-
-
bo liu authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 25 Apr, 2022 2 commits
-
-
Colin Ian King authored
Pointer substream is being dereferenced on the assignment of pointer card before substream is being null checked with the macro PCM_RUNTIME_CHECK. Although PCM_RUNTIME_CHECK calls BUG_ON, it still is useful to perform the the pointer check before card is assigned. Fixes: d4cfb30f ("ALSA: pcm: Set per-card upper limit of PCM buffer allocations") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220424205945.1372247-1-colin.i.king@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Mark Brown authored
Not much of a test but we keep on getting problems with boolean controls not being called Switches so let's add a few basic checks to help people spot problems. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220421115020.14118-1-broonie@kernel.orgSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 21 Apr, 2022 2 commits
-
-
Takashi Iwai authored
Use the new quirk bits to manage the generic implicit fb quirk entries. This makes easier to compare with other devices. Link: https://lore.kernel.org/r/20220421064101.12456-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
For making easier to test, add the new quirk_flags bits 17 and 18 to enable and disable the generic implicit feedback mode. The bit 17 is equivalent with implicit_fb=1 option, applying the generic implicit feedback sync mode. OTOH, the bit 18 disables the implicit fb mode forcibly. Link: https://lore.kernel.org/r/20220421064101.12456-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 13 Apr, 2022 20 commits
-
-
Takashi Iwai authored
Back-merge the 5.18-rc3 devel branch, as it influences on the further development. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Pull CS35L41 codec updates Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
Add support for external boost voltage, where GPIO1 must control a switch to isolate CS35L41 from the external Boost Voltage Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220413083728.10730-17-tanureal@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
David Rhodes authored
Document internal and external boost feature for ASoC CS35L41. For internal boost the following properties are required: - cirrus,boost-peak-milliamp - cirrus,boost-ind-nanohenry - cirrus,boost-cap-microfarad For external boost, the GPIO1 must be configured as output, so the following properties are required: - cirrus,gpio1-src-select = <1> - cirrus,gpio1-output-enable Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com> Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220413083728.10730-16-tanureal@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
Internal Boost enable is the default option from reset, but with external boost support, internal boost must be disabled. Add the enable of internal boost in cs35l41_boost_config to centralize the internal boost 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-10-tanureal@opensource.cirrus.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Lucas Tanure authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
In the previous fix, we increased the max buffer bytes from 1MB to 4MB so that we can use bigger buffers for the modern HiFi devices with higher rates, more channels and wider formats. OTOH, extending this has a concern that too big buffer is allowed for the lower rates, less channels and narrower formats; when an application tries to allocate as big buffer as possible, it'll lead to unexpectedly too huge size. Also, we had a problem about the inconsistent max buffer and period bytes for the implicit feedback mode when both streams have different channels. This was fixed by the (relatively complex) patch to reduce the max buffer and period bytes accordingly. This is an alternative fix for those, a patch to kill two birds with one stone (*): instead of increasing the max buffer bytes blindly and applying the reduction per channels, we simply use the hw constraints for the buffer and period "time". Meanwhile the max buffer and period bytes are set unlimited instead. Since the inconsistency of buffer (and period) bytes comes from the difference of the channels in the tied streams, as long as we care only about the buffer (and period) time, it doesn't matter; the buffer time is same for different channels, although we still allow higher buffer size. Similarly, this will allow more buffer bytes for HiFi devices while it also keeps the reasonable size for the legacy devices, too. As of this patch, the max period and buffer time are set to 1 and 2 seconds, which should be large enough for all possible use cases. (*) No animals were harmed in the making of this patch. Fixes: 98c27add ("ALSA: usb-audio: Cap upper limits of buffer/period bytes for implicit fb") Fixes: fee2ec8c ("ALSA: usb-audio: Increase max buffer size") Link: https://lore.kernel.org/r/20220412130740.18933-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The recent change for memory allocator replaced the SG-buffer handling helper for x86 with the standard non-contiguous page handler. This works for most cases, but there is a corner case I obviously overlooked, namely, the fallback of non-contiguous handler without IOMMU. When the system runs without IOMMU, the core handler tries to use the continuous pages with a single SGL entry. It works nicely for most cases, but when the system memory gets fragmented, the large allocation may fail frequently. Ideally the non-contig handler could deal with the proper SG pages, it's cumbersome to extend for now. As a workaround, here we add new types for (minimalistic) SG allocations, instead, so that the allocator falls back to those types automatically when the allocation with the standard API failed. BTW, one better (but pretty minor) improvement from the previous SG-buffer code is that this provides the proper mmap support without the PCM's page fault handling. Fixes: 2c95b92e ("ALSA: memalloc: Unify x86 SG-buffer handling (take#3)") BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2272 BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1198248 Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220413054808.7547-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 12 Apr, 2022 3 commits
-
-
Takashi Iwai authored
The card destructor of nm256 driver does merely stopping the running streams, and it's superfluous for the probe error handling. Moreover, calling this via the previous devres change would lead to another problem due to the reverse call order. This patch moves the setup of the private_free callback after the card registration, so that it can be used only after fully set up. Fixes: c19935f0 ("ALSA: nm256: Allocate resources with device-managed APIs") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220412102636.16000-40-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The card destructor of nm256 driver does merely stopping the running timer, and it's superfluous for the probe error handling. Moreover, calling this via the previous devres change would lead to another problem due to the reverse call order. This patch moves the setup of the private_free callback after the card registration, so that it can be used only after fully set up. Fixes: aa92050f ("ALSA: mtpav: Allocate resources with device-managed APIs") Link: https://lore.kernel.org/r/20220412102636.16000-39-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The previous cleanup with devres may lead to the incorrect release orders at the probe error handling due to the devres's nature. Until we register the card, snd_card_free() has to be called at first for releasing the stuff properly when the driver tries to manage and release the stuff via card->private_free(). This patch fixes it by calling snd_card_free() manually on the error from the probe callback. Fixes: b1002b2d ("ALSA: rme9652: Allocate resources with device-managed APIs") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220412102636.16000-38-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-