summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_cs8409.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda/cs8409: Add Speaker Playback Switch for WarlockStefan Binding2022-05-121-0/+1
| | | | | | | | | | | | | 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>
* ALSA: hda/cs8409: Add Speaker Playback Switch for CyborgStefan Binding2022-05-121-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. 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>
* ALSA: hda/cs8409: Support new Odin VariantsStefan Binding2022-05-121-0/+1
| | | | | | | | | 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>
* ALSA: hda/cs8409: Support manual mode detection for CS42L42Stefan Binding2022-05-091-1/+0
| | | | | | | | | | | | | 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>
* ALSA: hda/cs8409: Use general cs42l42 include in cs8409 hda driverStefan Binding2022-05-091-7/+1
| | | | | | | | 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>
* ALSA: hda/cs8409: Support new Warlock MLK VariantsStefan Binding2022-03-281-0/+2
| | | | | | | | | | | | | | | Added 15 new laptops, with 2 variants: Warlock MLK and Warlock MLK with Dual Mic The only difference between the variants, is the the dual Mic variants use a stereo DMIC. These variants do no use reduce volume (Full Scale 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/20220328115614.15761-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/cs8409: Fix Full Scale Volume setting for all variantsStefan Binding2022-03-281-0/+3
| | | | | | | | | | | | | All current variants (Bullseye/Warlock/Cyborg) should be using reduced volume (-6dB) for better speaker protection. Refactor to make more explicit the meaning and setting of Full Scale Volume setting to avoid future confusion. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220328115614.15761-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/cs8409: Fix Jack detection after resumeChristian A. Ehrhardt2022-01-041-0/+1
| | | | | | | | | | | | The suspend code unconditionally sets ->hp_jack_in and ->mic_jack_in to zero but without reporting this status change to the HDA core. To compensate for this, always assume a status change on the first unsol event after boot or resume. Fixes: 424e531b47f8 ("ALSA: hda/cs8409: Ensure Type Detection is only run on startup when necessary") Signed-off-by: Christian A. Ehrhardt <lk@c--e.de> Link: https://lore.kernel.org/r/20211231134432.atwmuzeceqiklcoa@cae.in-ulm.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/cs8409: Ensure Type Detection is only run on startup when necessaryStefan Binding2021-08-271-0/+2
| | | | | | | | | | 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/cs8409: Unmute/Mute codec when stream starts/stopsStefan Binding2021-08-121-0/+7
| | | | | | | | | 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-121-0/+2
| | | | | | | 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: Use timeout rather than retries for I2C transaction waitsStefan Binding2021-08-121-0/+2
| | | | | | | 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-121-0/+2
| | | | | | | | | 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: Add support for dolphinLucas Tanure2021-08-121-0/+24
| | | | | | | | | | | | | | | | | | | 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-121-0/+1
| | | | | | | | | | 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: Move codec properties to its own structLucas Tanure2021-08-121-11/+28
| | | | | | | | | | | | 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-121-12/+12
| | | | | | | 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-121-3/+5
| | | | | | | | | | | 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-121-0/+2
| | | | | | | 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-121-0/+1
| | | | | | | 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-121-0/+4
| | | | | | | | | | | | | | | | | | | | | 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-121-8/+19
| | | | | | | | | | 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-121-0/+1
| | | | | | | 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: Use enums for register names and coefficientsStefan Binding2021-08-121-28/+211
| | | | | | | 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-121-0/+19
| | | | | | | 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-121-0/+91
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>