summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda/cs8409: Initialize Codec only in init fixup.Stefan Binding2021-08-271-2/+0
| | | | | | | | | | It is not necessary to initialize the codec during both probe and inside the init fixup. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210827110252.5361-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/cs8409: Ensure Type Detection is only run on startup when necessaryStefan Binding2021-08-272-6/+30
| | | | | | | | | | Type Detection should only be run after init and when the controls have been built. There is no need to run it multiple times. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210827110252.5361-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: Disable runtime resume at shutdownTakashi Iwai2021-08-261-4/+2
| | | | | | | | | | | | | | | | | | | | | Although we modified the codec shutdown callback to perform runtime-suspend, it's still not fully effective, as this may be resumed again at any time later. For fixing such an unwanted resume, this patch replaces pm_runtime_suspend() with pm_runtime_force_suspend(), and call pm_runtime_disable() afterward. It assures to keep the device suspended. Also for code simplification, we apply the code unconditionally; when it's been already suspended, nothing would happen by calls of snd_pcm_suspend_all() and pm_runtime_force_suspend(), just proceed to pm_runtime_disable(). Fixes: b98444ed597d ("ALSA: hda: Suspend codec at shutdown") Reported-and-tested-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210826154752.25674-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2021-08-241-0/+1
|\
| * ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setupJohnathon Clark2021-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | This patch extends support for the HP Spectre x360 14 amp enable quirk to support a model of the device with an additional subdevice ID. Signed-off-by: Johnathon Clark <john.clark@cantab.net> Link: https://lore.kernel.org/r/20210823162110.8870-1-john.clark@cantab.net Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2021-08-231-2/+19
|\|
| * ALSA: hda/realtek: Workaround for conflicting SSID on ASUS ROG Strix G17Takashi Iwai2021-08-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASUS ROG Strix G17 has the very same PCI and codec SSID (1043:103f) as ASUS TX300, and unfortunately, the existing quirk for TX300 is broken on ASUS ROG. Actually the device works without the quirk, so we'll need to clear the quirk before applying for this device. Since ASUS ROG has a different codec (ALC294 - while TX300 has ALC282), this patch adds a workaround for the device, just clearing the codec->fixup_id by checking the codec vendor_id. It's a bit ugly to add such a workaround there, but it seems to be the simplest way. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214101 Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210820143214.3654-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8Kai-Heng Feng2021-08-191-2/+9
| | | | | | | | | | | | | | | | | | | | The mic has lots of noises if mic boost is enabled. So disable mic boost to get crystal clear audio capture. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210818144119.121738-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Allow model option to specify PCI SSID aliasTakashi Iwai2021-08-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | There are tons of quirks for HD-audio and many of them are without model string, hence it's not trivial to apply the same quirk for a new device. This patch makes it easier: namely, the model string accepts a form as "XXXX:YYYY" (a pair of hex numbers of the subsystem-vendor and subsystem-device IDs), to specify the alias of PCI (or codec) SSID. e.g. passing model=1234:abcd would apply the quirk that matches with the given SSID 1234:abcd instead of the actual SSID. Link: https://lore.kernel.org/r/20210823073722.14873-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Code refactoring snd_hda_pick_fixup()Takashi Iwai2021-08-231-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This contains a slight code refactoring of snd_hda_pick_fixup(): - Unify the ID setup - Unify the debug print message - Use snd_pci_quirk_lookup_id() for the codec SSID matching Mostly for simplifying the code flow but also it makes easier to add the codec alias handling in the upcoming patch. Link: https://lore.kernel.org/r/20210823073722.14873-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/analog - Sink ad198x_shutup() and shuffle CONFIG_PM guardsNathan Chancellor2021-08-181-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_PM is not set, there is an unused function warning: sound/pci/hda/patch_analog.c:115:13: warning: unused function 'ad198x_shutup' [-Wunused-function] static void ad198x_shutup(struct hda_codec *codec) ^ 1 warning generated. Sink ad198x_shutup() into ad198x_suspend(), as it is only called in that one space. Move the CONFIG_PM guards above ad198x_power_eapd_write() as it is only called in ad198x_power_eapd(), which is in turn only called in ad198x_power_eapd(). Those two functions are large enough that they are left alone. Fixes: 327b34f2a97d ("ALSA: hda: Nuke unused reboot_notify callback") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210818012705.311963-2-nathan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/sigmatel - Sink stac_shutup() into stac_suspend()Nathan Chancellor2021-08-181-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_PM is not set, there is an unused function warning: sound/pci/hda/patch_sigmatel.c:4383:13: warning: unused function 'stac_shutup' [-Wunused-function] static void stac_shutup(struct hda_codec *codec) ^ 1 warning generated. Sink the contents of stac_shutup() into stac_suspend() since stac_shutup() is only called in that one location now. Fixes: 327b34f2a97d ("ALSA: hda: Nuke unused reboot_notify callback") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210818012705.311963-1-nathan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Drop workaround for a hang at shutdown againTakashi Iwai2021-08-171-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 0165c4e19f6e ("ALSA: hda: Fix hang during shutdown due to link reset") modified the shutdown callback of the HD-audio controller for working around a hang. Meanwhile, the actual culprit of the hang was identified to be the leftover active codecs that may interfere with the powered down controller somehow, but we took a minimal fix approach for 5.14, and that was the commit above. Now, since the codec drivers go runtime-suspend at shutdown for 5.15, we can revert the change and make sure that the full runtime-suspend is performed at shutdown of HD-audio controller again. This patch essentially reverts the commit above to restore the behavior. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045 Link: https://lore.kernel.org/r/20210817075630.7115-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2021-08-174-6/+19
|\|
| * ALSA: hda/via: Apply runtime PM workaround for ASUS B23ETakashi Iwai2021-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | ASUS B23E requires the same workaround like other machines with VT1802, otherwise it looses the codec power on a few nodes and the sound kept silence. Fixes: a0645daf1610 ("ALSA: HDA: Early Forbid of runtime PM") Link: https://lore.kernel.org/r/ac2232f142efcd67fe6ac38897f704f7176bd200.camel@gmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210817052432.14751-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: Fix hang during shutdown due to link resetImre Deak2021-08-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During system shutdown codecs may be still active, and resetting the controller->codec HW link in this state - based on the bug reporter's tests - leads to the shutdown sequence to get stuck. This happens at least on the reporter's KBL system with an ALC662 codec. For now fix the issue by skipping the link reset step. Fixes: 472e18f63c42 ("ALSA: hda: Release controller display power during shutdown/reboot") References: https://bugzilla.kernel.org/show_bug.cgi?id=214045 References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618#note_1024665 Reported-and-tested-by: youling257@gmail.com Cc: youling257@gmail.com Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/20210816174259.2759103-1-imre.deak@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9510 laptopKristin Paget2021-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | The 2021-model XPS 15 appears to use the same 4-speakers-on-ALC289 audio setup as the Precision models, so requires the same quirk to enable woofer output. Tested on my own 9510. Signed-off-by: Kristin Paget <kristin@tombom.co.uk> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/e1fc95c5-c10a-1f98-a5c2-dd6e336157e1@tombom.co.uk Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - fix the 'Capture Switch' value change notificationsJaroslav Kysela2021-08-121-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code in the cap_put_caller() function does not handle correctly the positive values returned from the passed function for multiple iterations. It means that the change notifications may be lost. Fixes: 352f7f914ebb ("ALSA: hda - Merge Realtek parser code to generic parser") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213851 Cc: <stable@kernel.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20210811161441.1325250-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PCJeremy Szu2021-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | The HP ProBook 650 G8 Notebook PC is using ALC236 codec which is using 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210810100846.65844-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Nuke unused reboot_notify callbackTakashi Iwai2021-08-147-49/+1
| | | | | | | | | | | | | | | | | | | | As reboot_notify callback is no longer used by the codec core, let's get rid of the unused code. Conexant codec needs a slight code change as it used to call the reboot_notify at the codec removal, too. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045 Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: Suspend codec at shutdownTakashi Iwai2021-08-143-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we have a few workarounds at shutdown for each codec, e.g. turning off the display power and setting the codec to D3. But all those are basically a part of the suspend procedure. Moreover, the streams are still active after that call, hence it might hit the update on the codec that has been already put to D3. In this patch, instead of calling each reboot_notify callback, simply put the codec into the runtime-suspended state after the manual suspend of all PCM streams. It makes the code and the behavior more consistent. The reboot_notify callback is no longer used after this patch, and will be cleaned up later. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045 Link: https://lore.kernel.org/r/20210813081230.4268-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: conexant: Turn off EAPD at suspend, tooTakashi Iwai2021-08-141-1/+15
| | | | | | | | | | | | | | | | | | | | | | Conexant codecs have a workaround for the noise at shutdown to turn off EAPD, but it wasn't applied at suspend. In the later patch, we'll switch from reboot_notify callback to the general suspend-at-shutdown, so let's apply the workaround to the suspend case, too. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045 Link: https://lore.kernel.org/r/20210813081230.4268-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Prevent pops and clicks during suspendStefan Binding2021-08-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | Some of the register values set for type detection cause pops during suspend, ensure these are cleaned up after type detection completes, as well ensuring that these are cleared when we suspend. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210812183433.6330-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Unmute/Mute codec when stream starts/stopsStefan Binding2021-08-123-30/+120
| | | | | | | | | | | | | | | | | | Codec is muted on init, and then unmuted when the stream starts. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-28-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Follow correct CS42L42 power down sequence for suspendStefan Binding2021-08-122-1/+24
| | | | | | | | | | | | | | Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-27-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Remove unnecessary delaysStefan Binding2021-08-121-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | Since delays when starting jack detection after initialization have been reduced/removed, it is necessary to add back in an extra 20ms delay after the init sequence to allow the CS42L42 to power up correctly. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-26-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Use timeout rather than retries for I2C transaction waitsStefan Binding2021-08-122-13/+5
| | | | | | | | | | | | | | Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-25-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Set fixed sample rate of 48kHz for CS42L42Stefan Binding2021-08-123-0/+16
| | | | | | | | | | | | | | | | | | CS42L42 is configured to use a fixed sample rate of 48kHz. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-24-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Enable Full Scale Volume for Line Out Codec on DolphinStefan Binding2021-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | Headphones codec will keep reduced maximum volume. Line Out codec will have increased maximum volume. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-23-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Add support for dolphinLucas Tanure2021-08-123-0/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dolphin devices have CS8409 HDA Bridge connected to two CS42L42 codecs. Codec 1 supports Headphone and Headset Mic. Codec 2 supports Line Out. Features: - Front and Read Jacks appear as separate jacks; Removal or connection of on jack should not affect the connection of the other. - Front Jack only shows up on jack detection. - Rear Jack is Phantom Jack. - Separate Volume Controls for each Jack Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-22-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Add Support to disable jack type detection for CS42L42Stefan Binding2021-08-123-31/+43
| | | | | | | | | | | | | | | | | | | | Some hardware configurations do not support jack type detection. Instead, for those configurations, only tip detection is supported. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-21-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Support multiple sub_codecs for Suspend/Resume/Unsol eventsStefan Binding2021-08-121-13/+28
| | | | | | | | | | | | | | Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-20-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Move codec properties to its own structLucas Tanure2021-08-123-250/+284
| | | | | | | | | | | | | | | | | | | | | | | | To accommodate move, cs42l42_resume has been added to mirror the existing function cs42l42_suspend. Function cs42l42_reset is no longer required, since cs42l42_resume and cs42l42_suspend perform the same operations. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-19-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Separate CS8409, CS42L42 and project functionsLucas Tanure2021-08-123-180/+195
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-18-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Support i2c bulk read/write functionsLucas Tanure2021-08-123-83/+136
| | | | | | | | | | | | | | | | | | | | | | This allows mutex locks to be moved into i2c functions, as the bulk read/write functions can lock/unlock themselves to prevent interruption of sequence reads/writes. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-17-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Avoid re-setting the same page as the last accessLucas Tanure2021-08-122-55/+71
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-16-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Avoid setting the same I2C address for every accessLucas Tanure2021-08-122-2/+18
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-15-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Dont disable I2C clock between consecutive accessesLucas Tanure2021-08-122-18/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only disable I2C clock 25 ms after not being used. The current implementation enables and disables the I2C clock for each I2C transaction. Each enable/disable call requires two verb transactions. This means each I2C transaction requires a total of four verb transactions to enable and disable the clock. However, if there are multiple consecutive I2C transactions, it is not necessary to enable and disable the clock each time, instead it is more efficient to enable the clock for the first transaction, and disable it after the final transaction, which would improve performance. This is achieved by using a timeout which disables the clock if no request to enable the clock has occurred for 25 ms. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-14-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Generalize volume controlsLucas Tanure2021-08-123-124/+105
| | | | | | | | | | | | | | | | | | | | Use amp offsets as indexes for saved volumes. Remove dependencies on NID inside volume control functions. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-13-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Prevent I2C access during suspend timeLucas Tanure2021-08-122-0/+15
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-12-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Simplify CS42L42 jack detect.Stefan Binding2021-08-121-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | Cleanup interrupt masks. Remove unnecessary read/writes. Ensure Tip Sense/Type Detection interrupts are enabled/disabled when needed. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-11-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Mask CS42L42 wake eventsStefan Binding2021-08-121-2/+2
| | | | | | | | | | | | | | | | | | Wake events are not needed for jack detect. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-10-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Disable unsolicited response for the first bootLucas Tanure2021-08-121-3/+2
| | | | | | | | | | | | | | | | | | | | The subsequence suspend and remuse have their enable/disable unsolicited responses at the correct place already Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-9-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Disable unsolicited responses during suspendStefan Binding2021-08-121-12/+14
| | | | | | | | | | | | | | | | | | | | Ensure unsolicited responses cannot occur whilst the sub codecs are being disabled. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-8-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Disable unnecessary Ring Sense for Cyborg/Warlock/BullseyeStefan Binding2021-08-121-3/+1
| | | | | | | | | | | | | | | | | | Also remove unnecessary repeated register writes. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-7-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Reduce HS pops/clicks for CyborgStefan Binding2021-08-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | Enable HSBIAS_SENSE_EN for Cyborg during jack detect to reduce pops and clicks. Do not enable this for Warlock/Bullseye, as it causes ESD issues. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-6-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Mask all CS42L42 interrupts on initializationStefan Binding2021-08-121-0/+12
| | | | | | | | | | | | | | Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Use enums for register names and coefficientsStefan Binding2021-08-123-109/+343
| | | | | | | | | | | | | | Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cs8409: Move arrays of configuration to a new fileLucas Tanure2021-08-124-218/+241
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/cirrus: Move CS8409 HDA bridge to separate moduleLucas Tanure2021-08-125-1074/+1163
| | | | | | | | | | | | | | Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>