summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'sound-fix-6.4-rc1' of ↵Linus Torvalds2023-05-0610-65/+117
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes for rc1. The only (LOC-wise) dominant change was ASoC Qualcomm fix, but most of it was merely a code shuffling. Another significant change here is for ALSA PCM core; it received a revert and a series of fixes for PCM auto-silencing where it caused a regression in the previous PR for rc1. Others are all small: ASoC Intel fixes, various quirks for ASoC AMD, HD-audio and USB-audio, the continued legacy emu10k1 code cleanup, and some documentation updates" * tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence() ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence() ALSA: pcm: playback silence - move silence variable updates to separate function ALSA: pcm: playback silence - remove extra code ALSA: pcm: fix playback silence - correct incremental silencing ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` ALSA: usb-audio: Add quirk for Pioneer DDJ-800 ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x ASoC: codecs: wcd938x: fix accessing regmap on unattached devices ALSA: docs: Fix code block indentation in ALSA driver example ALSA: docs: Extend module parameters description ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41 ALSA: emu10k1: use more existing defines instead of open-coded numbers ASoC: amd: yc: Add ASUS M3402RA into DMI table ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6 ...
| * ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptopKai-Heng Feng2023-05-051-0/+1
| | | | | | | | | | | | | | | | | | | | There's another laptop that needs the fixup to enable mute and micmute LEDs. So do it accordingly. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230505125925.543601-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LEDCaleb Harper2023-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the mute LED on the HP Pavilion Aero Laptop 13-be0xxx. The current behavior is that the LED does not turn on at any time and does not indicate to the user whether the sound is muted. The solution is to add a PCI quirk to properly recognize and support the LED on this device. This change has been tested on the device in question using modified versions of kernels 6.0.7-6.2.12 on Arch Linux. Signed-off-by: Caleb Harper <calebharp2005@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230503175026.6796-1-calebharp2005@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41Mark Asselstine2023-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | This Asus Zenbook laptop uses Realtek HDA codec combined with 2xCS35L41 Amplifiers using I2C with External Boost. Signed-off-by: Mark Asselstine <asselsm@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230501231346.54979-1-asselsm@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: emu10k1: use more existing defines instead of open-coded numbersOswald Buddenhagen2023-04-287-65/+69
| | | | | | | | | | | | | | | | | | | | | | | | Using the *_MASK defines for "maximal value" is debatable. I got the idea from FreeBSD, and it sorta makes sense to me. Some hunks look a bit incomplete, because code that is going to be subsequently removed is not touched here. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230428080732.1697695-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6Vitaly Rodionov2023-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | Lenovo ThinkPad P1 Gen 6 laptop has 2 CS35L41 amplifies on I2C bus connected to Realtek codec. Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230427110452.13787-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-linus' into for-nextTakashi Iwai2023-04-276-9/+66
| |\ | | | | | | | | | | | | | | | | | | Merge 6.3-devel branch back in order to apply the more Realtek HD-audio changes cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.jasontao2023-04-262-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a set of HD Audio PCI IDS, and the HDMI codec vendor IDs for Glenfly Gpus. - In default_bdl_pos_adj, set bdl to 128 as Glenfly Gpus have hardware limitation, need to increase hdac interrupt interval. - In azx_first_init, enable polling mode for Glenfly Gpu. When the codec complete the command, it sends interrupt and writes response entries to memory, howerver, the write requests sometimes are not actually synchronized to memory when driver handle hdac interrupt on Glenfly Gpus. If the RIRB status is not updated in the interrupt handler, azx_rirb_get_response keeps trying to recevie a response from rirb until 1s timeout. Enabling polling mode for Glenfly Gpu can fix the issue. - In patch_gf_hdmi, set Glenlfy Gpu Codec's no_sticky_stream as it need driver to do actual clean-ups for the linked codec when switch from one codec to another. Signed-off-by: jasontao <jasontao@glenfly.com> Signed-off-by: Reaper Li <reaperlioc@glenfly.com> Link: https://lore.kernel.org/r/20230426013059.4329-1-reaperlioc@glenfly.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge tag 'spi-v6.4' of ↵Linus Torvalds2023-04-271-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A fairly standard release for SPI with the exception of a change to the API for specifying chip selects done in preparation for supporting devices with more than one chip select, this required some mechanical changes throughout the tree which have been cooking in -next happily for a while. There's also a new API to allow us to support TPM chips on half duplex controllers. Summary: - Refactoring in preparation for supporting multiple chip selects for a single device, needed by some flash devices, which required a change in the SPI device API visible throughout the tree - Support for hardware assisted interaction with SPI TPMs on half duplex controllers, implemented on nVidia Tedra210 QuadSPI - Optimisation for large transfers on fsl-cpm devices - Cleanups around device property use which fix some sisues with fwnode - Use of both void remove() and devm_platform_.*ioremap_resource() - Support for AMD Pensando Elba, Amlogic A1, Cadence device mode, Intel MetorLake-S and StarFive J7110 QuadSPI" * tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (185 commits) spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: tegra210-quad: Enable TPM wait polling spi: Add TPM HW flow flag spi: bcm63xx: remove PM_SLEEP based conditional compilation spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: spi-cadence: Add support for Slave mode spi: spi-cadence: Switch to spi_controller structure spi: cadence-quadspi: fix suspend-resume implementations spi: dw: Add support for AMD Pensando Elba SoC spi: dw: Add AMD Pensando Elba SoC SPI Controller spi: cadence-quadspi: Disable the SPI before reconfiguring spi: cadence-quadspi: Update the read timeout based on the length spi: spi-loopback-test: Add module param for iteration length spi: add support for Amlogic A1 SPI Flash Controller dt-bindings: spi: add Amlogic A1 SPI controller spi: fsl-spi: No need to check transfer length versus word size spi: fsl-spi: Change mspi_apply_cpu_mode_quirks() to void spi: fsl-cpm: Use 16 bit mode for large transfers with even size spi: fsl-spi: Re-organise transfer bits_per_word adaptation spi: fsl-spi: Fix CPM/QE mode Litte Endian ...
| * | | ALSA: hda: cs35l41: Replace all spi->chip_select references with function callAmit Kumar Mahapatra2023-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> Link: https://lore.kernel.org/r/20230310173217.3429788-9-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | Merge tag 'sound-6.4-rc1' of ↵Linus Torvalds2023-04-2722-539/+355
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "At this time, it's an interesting mixture of changes for both old and new stuff. Majority of changes are about ASoC (lots of systematic changes for converting remove callbacks to void, and cleanups), while we got the fixes and the enhancements of very old PCI cards, too. Here are some highlights: ALSA/ASoC Core: - Continued effort of more ASoC core cleanups - Minor improvements for XRUN handling in indirect PCM helpers - Code refactoring of PCM core code ASoC: - Continued feature and simplification work on SOF, including addition of a no-DSP mode for bringup, HDA MLink and extensions to the IPC4 protocol - Hibernation support for CS35L45 - More DT binding conversions - Support for Cirrus Logic CS35L56, Freescale QMC, Maxim MAX98363, nVidia systems with MAX9809x and RT5631, Realtek RT712, Renesas R-Car Gen4, Rockchip RK3588 and TI TAS5733 ALSA: - Lots of works for legacy emu10k1 and ymfpci PCI drivers - PCM kselftest fixes and enhancements" * tag 'sound-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (586 commits) ALSA: emu10k1: use high-level I/O in set_filterQ() ALSA: emu10k1: use high-level I/O functions also during init ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put() ALSA: emu10k1: don't stop DSP in _snd_emu10k1_{,audigy_}init_efx() ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEP ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cards ALSA: emu10k1: fixup DSP defines ALSA: emu10k1: pull in some register definitions from kX-project ALSA: emu10k1: remove some bogus defines ALSA: emu10k1: eliminate some unused defines ALSA: emu10k1: fix lineup of EMU_HANA_* defines ALSA: emu10k1: comment updates ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards ALSA: emu10k1: remove unused emu->pcm_playback_efx_substream field ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init() ALSA: emu10k1: minor optimizations ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init() ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS reads ALSA: emu10k1: remove apparently pointless FPGA reads ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init() ...
| * | Merge tag 'asoc-v6.4' of ↵Takashi Iwai2023-04-242-7/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.4 The bulk of the commits here are for the conversion of drivers to use void remove callbacks but there's a reasonable amount of other stuff going on, the pace of development with the SOF code continues to be high and there's a bunch of new drivers too: - More core cleanups from Morimto-san. - Update drivers to have remove() callbacks returning void, mostly mechanical with some substantial changes. - Continued feature and simplification work on SOF, including addition of a no-DSP mode for bringup, HDA MLink and extensions to the IPC4 protocol. - Hibernation support for CS35L45. - More DT binding conversions. - Support for Cirrus Logic CS35L56, Freescale QMC, Maxim MAX98363, nVidia systems with MAX9809x and RT5631, Realtek RT712, Renesas R-Car Gen4, Rockchip RK3588 and TI TAS5733.
| | * | ALSA: hda/tegra: Convert to platform remove callback returning voidUwe Kleine-König2023-03-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-10-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ALSA: cs35l41: Add shared boost featureLucas Tanure2023-03-051-3/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared boost allows two amplifiers to share a single boost circuit by communicating on the MDSYNC bus. The passive amplifier does not control the boost and receives data from the active amplifier. Shared Boost is not supported in HDA Systems. Based on David Rhodes shared boost patches. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Reviewed-by: David Rhodes <david.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20230223084324.9076-4-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ALSA: emu10k1: use high-level I/O in set_filterQ()Oswald Buddenhagen2023-04-241-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This makes the code shorter and more legible. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230423181002.1246793-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: use high-level I/O functions also during initOswald Buddenhagen2023-04-231-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and also use more pre-defined constants on the way (some of which required adjustment). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143967-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put()Oswald Buddenhagen2023-04-231-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check all inputs before changing anything, and return the right error code in case of failure. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1144026-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: don't stop DSP in _snd_emu10k1_{,audigy_}init_efx()Oswald Buddenhagen2023-04-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions don't actually touch the DSP until they poke the code into it, at which point it's temporarily stopped anyway. And fx8010.dbg is already zero anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1144004-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEPOswald Buddenhagen2023-04-231-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use correct address limit for Audigy - Use the right constant to actually make a step on Audigy - Don't store *_DBG_STEP and the address in emu->fx8010.dbg, as otherwise unrelated operations would make steps, too This is untested. as10k1 was never ported to Audigy anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1144004-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cardsOswald Buddenhagen2023-04-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rev2 cards use CA0108, but the embedded P17V goes entirely unused. Also, A_IOCTL (which is really the GPIO port) is actually the FPGA control port, so messing with it is no good idea. The hacks are actually mutually exclusive, so make that explicit while we're at it. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143888-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: pull in some register definitions from kX-projectOswald Buddenhagen2023-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For documentation purposes and later use. Some pre-existing but (mostly) unused definitions were renamed for consistency. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove some bogus definesOswald Buddenhagen2023-04-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, remove the FXWC_* defines - the comment on FXWC implies that the relevant defines are the (A_)EXTOUT_* ones. It's unclear where this came from - it was in the initial ALSA import, but neither the driver from Creative nor kX-project have these defines. Secondly, remove A_HR, which made plain no sense (was unused, and clashed with FXRT). Amends commit cbb7d8f9b7b ("emu10k1: Update registers defines for the Audigy 2/emu10k2.5"). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: comment updatesOswald Buddenhagen2023-04-238-76/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move comments to better locations, de-duplicate, fix/remove incorrect/ outdated ones, add new ones, and unify spacing somewhat. While at it, also add testing credits for Jonathan Dowland (SB Live! Platinum) and myself (E-MU 0404b). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cardsOswald Buddenhagen2023-04-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the Alice2 chips used on 1st generation E-MU cards, the Tina/Tina2 chips used on the 2nd gen cards have only six GPIN pins, which means that we need to use a smaller mask. Failure to do so would falsify the read data if the FPGA tried to raise an IRQ right at that moment. This wasn't a problem so far, as we didn't actually enable FPGA IRQs, but that's going to change soon. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422132430.1057490-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove unused emu->pcm_playback_efx_substream fieldOswald Buddenhagen2023-04-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Amends historic commit 27ae958cf6 ("emu10k1 driver - add multichannel device hw:x,3 [2-8/8]"). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422132430.1057468-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init()Oswald Buddenhagen2023-04-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was unnecessarily added in commit 09668b441da ("emu10k1 - Add PM support"). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422132430.1057468-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: minor optimizationsOswald Buddenhagen2023-04-222-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In snd_emu10k1_look_for_ctl(), evaluate the cheap condition first - In _snd_emu10k1_{audigy_,}init_efx(), don't use expensive bit setting loops to fill arrays - In snd_emu_proc_ptr_reg_read(), remove useless condition - iobase can be only 0 or 0x20 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422121519.1052813-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init()Oswald Buddenhagen2023-04-221-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Various redundant FPGA writes which were presumably also cargo-culted from the Windows driver. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS readsOswald Buddenhagen2023-04-221-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These seem to be another instance of cargo-culting from the Windows driver. It presumably queries the register to decide about the followup actions, but we don't do that. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove apparently pointless FPGA readsOswald Buddenhagen2023-04-221-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These seem to be simply cargo-culted from the Windows driver's behavior. However, the original reason were presumably read-modify-write cycles, which we don't do. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init()Oswald Buddenhagen2023-04-221-29/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything snd_emu10k1_init() wouldn't do later, and none of the things it does seem relevant for the function itself (which is pretty much about setting up the FPGA). It was probably a Windows driver behavior cargo-culting artifact. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: fix access to Audigy GPIO portOswald Buddenhagen2023-04-223-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the register definition clearly states, this is a 16-bit register, yet we did all accesses as 32-bit. The writes in particular would have the potential to clear the TIMER register (depending on how the bus/card actually handles the too long writes). This commit also introduces a separate define A_GPIO which aliases A_IOCFG, which better reflects the distinct usage on E-MU cards. This is done in the same commit to keep the churn down, as we're touching all involved lines anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: properly assert E-MU FPGA access constaintsOswald Buddenhagen2023-04-221-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assert the validity of the registers and values, as them being out of range would indicate an error in the driver. Consequently, don't bother returning error codes; they were ignored everywhere anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: clean up P16V part somewhatOswald Buddenhagen2023-04-222-94/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detach it better from the main PCM driver, which it really doesn't have much in common with. In particular, this moves the interrupt handler implementation into p16v.c, and makes it access the substream runtime status more directly, so it doesn't need to abuse structs snd_emu10k1_pcm and snd_emu10k1_voice any more. We don't need private pcm runtime data at all, as the only thing it was used for (except the back-link to the substream) was the `running` flag. So store that directly in runtime->private_data. This somewhat radical strip-down shows that this driver contains some complexity that was never actually utilized. I suppose the right way to fully utilize the hardware in a simple way would be introducing more substreams. This wouldn't require any of the removed code. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005452-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: remove unused snd_emu10k1_voice.emu fieldOswald Buddenhagen2023-04-222-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was written, but never read from. Its value is available via the epcm field. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005452-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: drop redundant snd_emu10k1_efx_playback_pointer()Oswald Buddenhagen2023-04-221-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's just an (outdated) copy of snd_emu10k1_playback_pointer(). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005452-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: drop redundant snd_emu10k1_efx_playback_hw_free()Oswald Buddenhagen2023-04-221-31/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Or actually, replace snd_emu10k1_playback_hw_free() with it, as that is a subset. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005452-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: clarify various fx8010.*_mask fieldsOswald Buddenhagen2023-04-212-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extin_mask and extout_mask are used only by the SbLive! microcode, so they have no effect on Audigy. Eliminate fxbus_mask entirely, as it wasn't actually used for anything. As a drive-by, remove the pointless pad1 field from struct snd_emu10k1_fx8010 - it is not visible to user space, so it has no binary compatibility constraints. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005509-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda/hdmi: Remove some dead codeChristophe JAILLET2023-04-181-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | These snd_BUG_ON() can never trigger, so just remove them to save a few LoC. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/91a31341f32d493bcc6c4515178ce0755ac1aa70.1681710069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda: LNL: add HD Audio PCI IDFred Oh2023-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HD Audio PCI ID for Intel Lunarlake platform. Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230406152500.15104-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: update label & help in config systemOswald Buddenhagen2023-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer E-MU cards weren't mentioned at all. The "partially supported" is removed ahead of it becoming mostly untrue. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230405201220.2197908-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: asihpi: remove unused loop_count variableTom Rix2023-03-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang with W=1 reports sound/pci/asihpi/hpi6000.c:1256:6: error: variable 'loop_count' set but not used [-Werror,-Wunused-but-set-variable] u32 loop_count = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20230326205712.1358918-1-trix@redhat.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Use register macro in place of integer literalTasos Sahanidis2023-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The macro for said register already exists, so just use it, to make the code more readable. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329043918.179352-1-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Use u16 consistently for old_legacy_ctrlTasos Sahanidis2023-03-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to switch between unsigned short and u16, especially since all the functions that end up using old_legacy_ctrl specify u16 anyway. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329043627.178899-1-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Store additional legacy registers on suspendTasos Sahanidis2023-03-292-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YMF744 and newer store the base IO ports in separate PCI config registers. Since these registers were not restored, when set to a non-default value, features that rely on them (FM, MPU401, gameport) were not functional after restore, as their respective IO ports were reset to their defaults. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329041440.177363-5-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Store saved legacy registers in an arrayTasos Sahanidis2023-03-292-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for storing more than two legacy PCI registers, the existing ones are moved into a new array. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329041440.177363-4-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Move allocation of saved registers to struct snd_ymfpciTasos Sahanidis2023-03-292-35/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | The registers were previously allocated when CONFIG_PM_SLEEP was set, however this only saved an insignificant amount of memory otherwise. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329041440.177363-3-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Switch to DEFINE_SIMPLE_DEV_PM_OPS()Tasos Sahanidis2023-03-293-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones") SIMPLE_DEV_PM_OPS has been marked deprecated. The intent is to remove CONFIG_PM_SLEEP guards for PM callbacks. As such the ifdefs are now removed. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329041440.177363-2-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Add error messages for abritrary IO ports on older chipsTasos Sahanidis2023-03-291-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As an end user, it can be confusing to request an arbitrary IO port be used only to find out that it doesn't work without an obvious reason, especially since /sys/module/snd_ymfpci/parameters/{fm,joystick,mpu}_port indicate 0 after the module has been loaded. In my case, I was unaware that the YMF724 did not support such usage, and thus ended up spending time attempting to debug the issue. Now, when a user attempts to request an IO port that isn't supported by the hardware, the following message is printed: [ 25.549530] snd_ymfpci 0000:06:05.0: The Yamaha DS-1 (YMF724F) does not support arbitrary IO ports for FM (requested 0x1234) Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Link: https://lore.kernel.org/r/20230329034204.171901-1-tasos@tasossah.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'for-linus' into for-nextTakashi Iwai2023-03-245-6/+19
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Back-merge of 6.3 devel branch for further changes of PCM and documentation. Signed-off-by: Takashi Iwai <tiwai@suse.de>