summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-12-29ALSA: scarlett2: Add #define for SCARLETT2_MIX_MAXGeoffrey D. Bennett1-1/+4
Add a #define for SCARLETT2_MIX_MAX (max of mixer inputs * outputs) as that will be used again soon. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/83cec5ccd75f0db2bd061a76d31a7023d26300c1.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add scarlett2_mixer_value_to_db()Geoffrey D. Bennett1-11/+17
Refactor scarlett2_usb_get_mix(), moving the scarlett2_mixer_values[] lookup into scarlett2_mixer_value_to_db(). Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/7adf869852aba2819fddb850b0ea8df5f7d73931.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Allow for interfaces without per-channel volumeGeoffrey D. Bennett1-28/+40
Currently-supported interfaces with a mixer have per-channel volume controls, but this changes in Gen 4. Add a check so that the Playback Volume and associated controls don't get created unless the SCARLETT2_CONFIG_LINE_OUT_VOLUME config item is present. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/30f68cb311e27f2cc1351cb846218f7248a90263.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Remove line_out_hw_vol device info entryGeoffrey D. Bennett1-49/+96
By splitting config set gen2 into gen2a/b (for 6i6/18i8 vs 18i20), and gen3b into gen3b/c (for 4i4/8i6 vs 18i8/18i20), we can use scarlett2_has_config_item() instead of the per-device line_out_hw_vol. As Gen 4 has a master volume control but no SW/HW switches, check for both SCARLETT2_CONFIG_MASTER_VOLUME and SCARLETT2_CONFIG_SW_HW_SWITCH as needed, even though for Gen 2 and Gen 3 the former implies the latter. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/307c4f8d6d2e034f3e386b51d72a39d77c8a9fce.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Split dim_mute_update from vol_updatedGeoffrey D. Bennett1-21/+42
Scarlett Gen 2 and Gen 3 devices combine volume and dim/mute notifications. The Scarlett 4i4 Gen 4 has volume change notification but no dim/mute control so split dim_mute_update out from vol_update. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/bf63f48bcc68ae739bd9948c8ee2f87ee7af22a2.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Remove struct scarlett2_usb_volume_statusGeoffrey D. Bennett1-69/+61
The struct scarlett2_usb_volume_status matched the config space layout of a few volume controls that could be read together and were in fixed locations between Gen 2 and Gen 3 devices. Gen 4 devices have removed, moved, and new related controls, so this needs to be cleaned up. By adding SCARLETT2_CONFIG_MASTER_VOLUME (the only config item that didn't already have its own entry, because it is read-only), we can remove: - struct scarlett2_usb_volume_state, - #define SCARLETT2_USB_VOLUME_STATUS_OFFSET, and - scarlett2_usb_get_volume_status() and replace with calls to scarlett2_usb_get_config(). Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/2ee88994857246bf89fab8e62ac279f3bcf96192.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Refactor common port_count lookupsGeoffrey D. Bennett1-72/+35
Rather than looking up the analogue and mixer I/O counts repeatedly in info->port_count[SCARLETT2_PORT_TYPE_*][SCARLETT2_PORT_*], save those numbers in private variables. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/db0a5b56bdff476e2e31ad8e5ee15008314412b7.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Change num_mux_* from int to u8Geoffrey D. Bennett1-2/+2
num_mux_srcs and num_mux_dsts will fit into a u8, so change the type. More similar counts are coming soon. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/886fbd9ce7f06b13c6dbf36f64e6b2d107d16a83.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Parameterise notificationsGeoffrey D. Bennett1-17/+45
The notification values were previously #define'd, and checked with a series of if() statements calling functions. Replace with an array of masks/callback function pointers, and a pointer to that array in the scarlett2_config_set definitions. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/0ee2a3786f9d30c89eeae59d7e933424e8f39162.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Formatting fixesGeoffrey D. Bennett1-14/+8
Add missing blank line before comment. For consistency with other functions that have few parameters, move the parameters onto the same line as the function name. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/72be568b02eea12621b0c4a96f8e8cc65b0c13c0.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Refactor scarlett2_config_save()Geoffrey D. Bennett1-21/+19
Use the new scarlett2_usb_activate_config() helper function rather than preparing the request manually and calling scarlett2_usb(). Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/bbc733dc081f311fb3167e81b15cd76324aa6307.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Refactor scarlett2_usb_set_config()Geoffrey D. Bennett1-16/+41
Pull out common code from scarlett2_usb_set_config() and create scarlett2_usb_set_data() and scarlett2_usb_activate_config(). Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/257eca0b07708339133f916930e388057d116eb8.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add check for config_item presenceGeoffrey D. Bennett1-0/+12
Update scarlett2_usb_get_config() and scarlett2_usb_set_config() to make sure that the config_item_num is valid for the device. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/b0572b23291ffd1b208f21d298adaf4d9f1fe4bc.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Remove scarlett2_config_sets arrayGeoffrey D. Bennett1-188/+173
Replace array index into config sets with a pointer to a config set. Copy the config_set pointer to the scarlett2_data struct. This simplifies both the definition and use of the config sets. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/61f69519fb6fbb677e066891a3a6771aeeec106d.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add config set structGeoffrey D. Bennett1-78/+89
Add struct scarlett2_config_set so that data which is common to all devices in a config set can be stored there rather than in the model-specific data. Accordingly, rename scarlett2_config_items[] to scarlett2_config_sets[]. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/bfdb04cd6239af9a8c26a52da0537980f77c0437.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Check presence of mixer using mux_assignmentGeoffrey D. Bennett1-3/+9
Currently the presence of a mixer is determined by checking if the device uses the GEN_3A config set. Add scarlett2_has_mixer() function which checks for the presence of mux_assignment entries instead. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ef6f4d360c2fe682ab65f83cccbe5be66ccc6296.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Check for phantom persistence config itemGeoffrey D. Bennett1-6/+12
Allow for the phantom persistence config item to not exist. This is needed for the Scarlett Gen 4 series. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/3ccaf8069280827bd6c44f103fcb770bd50b7e2e.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Infer standalone switch from config itemsGeoffrey D. Bennett1-6/+10
Rather than assuming the standalone switch is present for all devices with a mixer, instead check for the presence of the SCARLETT2_CONFIG_STANDALONE_SWITCH config item. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/59c30885b02d65feaab2c338cf46889d72d01813.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Infer has_msd_mode from config itemsGeoffrey D. Bennett1-15/+15
Rather than storing has_msd_mode in the per-device structure, infer this from the presence of the SCARLETT2_CONFIG_MSD_SWITCH entry in the device's configuration set. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ecbf3740e6b30a245333528ae4c504f37a9bc6bf.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Simplify enums by removing explicit valuesGeoffrey D. Bennett1-38/+38
This commit removes the explicit integer assignments from the enums. The actual values matter little, and not assigning explicit values makes it easier to modify the longer lists in the future. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/67f0f1bb8b90d7c76dfe7062d22d33bbde19cf93.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add support for uploading new firmwareGeoffrey D. Bennett1-3/+93
Add ops.write to the hwdep interface. Once the upgrade firmware flash segment has been erased, writes to the hwdep fd are permitted, and translated to SCARLETT2_USB_WRITE_SEGMENT commands to the device. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ZY65S0ojShSNSeRQ@m.b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add ioctl commands to erase flash segmentsGeoffrey D. Bennett2-6/+442
Add ioctls: - SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT - SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT - SCARLETT2_IOCTL_GET_ERASE_PROGRESS The settings or the firmware flash segment can be selected and then erased (asynchronous operation), and the erase progress can be monitored. If the erase progress is not monitored, then subsequent hwdep operations will block until the erase is complete. Once the erase is started, ALSA controls that communicate with the device will all return -EBUSY, and the device must be rebooted. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/227409adb672f174bf3db211e9bda016fb4646ea.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add skeleton hwdep/ioctl interfaceGeoffrey D. Bennett3-1/+101
Add skeleton hwdep/ioctl interface, beginning with SCARLETT2_IOCTL_PVERSION and SCARLETT2_IOCTL_REBOOT. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/24ffcd47a8a02ebad3c8b2438104af8f0169164e.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Retrieve useful flash segment numbersGeoffrey D. Bennett1-0/+103
Call SCARLETT2_USB_INFO_FLASH and SCARLETT2_USB_INFO_SEGMENT to find the App_Settings and App_Upgrade flash segment numbers, and store them in the scarlett2_data struct. These will be used later to implement reset to factory defaults and firmware upgrade functions. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/70f0108a9cf99b69f7aa920c4bcdb0cf4bf3da98.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add #defines for firmware upgradeGeoffrey D. Bennett1-11/+17
Add #defines for SCARLETT2_USB_* needed for firmware upgrade: reboot, info-flash, info-segment, erase-segment, get-erase, and write-segment. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/3077651c21bc8d4f046c68b79ec387aa16fcc5e4.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add missing mutex lock around get meter levelsGeoffrey D. Bennett1-2/+7
As scarlett2_meter_ctl_get() uses meter_level_map[], the data_mutex should be locked while accessing it. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 3473185f31df ("ALSA: scarlett2: Remap Level Meter values") Link: https://lore.kernel.org/r/77e093c27402c83d0730681448fa4f57583349dd.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put()Geoffrey D. Bennett1-1/+2
Ensure the value passed to scarlett2_mixer_ctl_put() is between 0 and SCARLETT2_MIXER_MAX_VALUE so we don't attempt to access outside scarlett2_mixer_values[]. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/3b19fb3da641b587749b85fe1daa1b4e696c0c1b.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add missing error checks to *_ctl_get()Geoffrey D. Bennett1-52/+130
The *_ctl_get() functions which call scarlett2_update_*() were not checking the return value. Fix to check the return value and pass to the caller. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/32a5fdc83b05fa74e0fcdd672fbf71d75c5f0a6d.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()Geoffrey D. Bennett1-1/+4
scarlett2_usb_set_config() calls scarlett2_usb_get() but was not checking the result. Return the error if it fails rather than continuing with an invalid value. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e15fae6c51a ("ALSA: usb-audio: scarlett2: Allow bit-level access to config") Link: https://lore.kernel.org/r/def110c5c31dbdf0a7414d258838a0a31c0fab67.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Add missing error check to scarlett2_config_save()Geoffrey D. Bennett1-3/+5
scarlett2_config_save() was ignoring the return value from scarlett2_usb(). As this function is not called from user-space we can't return the error, so call usb_audio_err() instead. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/bf0a15332d852d7825fa6da87d2a0d9c0b702053.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Update maintainer infoGeoffrey D. Bennett2-3/+6
Update MAINTAINERS and "enabled" message with GitHub repository links. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/62f32404eaa8663cc304648354b85bcb5914ce72.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: scarlett2: Convert meter levels from little-endianGeoffrey D. Bennett1-2/+2
Add missing conversion from little-endian data to CPU-endian in scarlett2_usb_get_meter_levels(). Fixes: 3473185f31df ("ALSA: scarlett2: Remap Level Meter values") Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ZYsBIE3DSKdi4YC/@m.b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: hda/tas2781: remove sound controls in unbindGergo Koteles1-93/+130
Remove sound controls in hda_unbind to make module loadable after module unload. Add a driver specific struct (tas2781_hda) to store the controls. This patch depends on patch: ALSA: hda/tas2781: do not use regcache Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/362aa3e2f81b9259a3e5222f576bec5debfc5e88.1703204848.git.soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: hda/tas2781: move set_drv_data outside tasdevice_initGergo Koteles3-2/+4
allow driver specific driver data in tas2781-hda-i2c and tas2781-i2c Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/1398bd8bf3e935b1595a99128320e4a1913e210a.1703204848.git.soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: hda/tas2781: fix typos in commentGergo Koteles1-2/+2
Correct typos. Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/ead5609d63e71e8e87c13e1767decca5b272d696.1703203812.git.soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29ALSA: hda/tas2781: do not use regcacheGergo Koteles2-17/+2
There are two problems with using regcache in this module. The amplifier has 3 addressing levels (BOOK, PAGE, REG). The firmware contains blocks that must be written to BOOK 0x8C. The regcache doesn't know anything about BOOK, so regcache_sync writes invalid values to the actual BOOK. The module handles 2 or more separate amplifiers. The amplifiers have different register values, and the module uses only one regmap/regcache for all the amplifiers. The regcache_sync only writes the last amplifier used. The module successfully restores all the written register values (RC profile, program, configuration, calibration) without regcache. Remove regcache functions and set regmap cache_type to REGCACHE_NONE. Link: https://lore.kernel.org/r/21a183b5a08cb23b193af78d4b1114cc59419272.1701906455.git.soyer@irl.hu/ Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Acked-by: Mark Brown <broonie@kernel.org> CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/491aeed0e2eecc3b704ec856f815db21bad3ba0e.1703202126.git.soyer@irl.hu Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-21ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernelStefan Binding1-0/+3
If CONFIG_SPI is not set in the kernel, there is no point in trying to set the chip selects. We can selectively compile it. Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312192256.lJelQEoZ-lkp@intel.com/ Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231219162232.790358-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-21ALSA: hda: cs35l41: Do not allow uninitialised variables to be freedStefan Binding1-4/+4
Initialise the variables to NULL so that they cannot be uninitialised when devm_kfree is called. Found by static analysis. Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD") Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231219162232.790358-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-21Merge tag 'asoc-fix-v6.7-rc7' of ↵Takashi Iwai10-39/+115
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.7 Quite a big collection of fixes, as ever mostly in drivers. There's one framework fix for the HDMI CODEC where it wasn't handling startup properly for some controllers, and one new x86 quirk, but otherwise all local fixes or dropping things we don't want to see in a release.
2023-12-19ASoC: fsl_sai: Fix channel swap issue on i.MX8MPShengjiu Wang1-0/+3
When flag mclk_with_tere and mclk_direction_output enabled, The SAI transmitter or receiver will be enabled in very early stage, that if FSL_SAI_xMR is set by previous case, for example previous case is one channel, current case is two channels, then current case started with wrong xMR in the beginning, then channel swap happen. The patch is to clear xMR in hw_free() to avoid such channel swap issue. Fixes: 3e4a82612998 ("ASoC: fsl_sai: MCLK bind with TX/RX enable bit") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://msgid.link/r/1702953057-4499-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-19ASoC: hdmi-codec: fix missing report for jack initial statusJerome Brunet1-2/+10
This fixes a problem introduced while fixing ELD reporting with no jack set. Most driver using the hdmi-codec will call the 'plugged_cb' callback directly when registered to report the initial state of the HDMI connector. With the commit mentionned, this occurs before jack is ready and the initial report is lost for platforms actually providing a jack for HDMI. Fix this by storing the hdmi connector status regardless of jack being set or not and report the last status when jack gets set. With this, the initial state is reported correctly even if it is disconnected. This was not done initially and is also a fix. Fixes: 15be353d55f9 ("ASoC: hdmi-codec: register hpd callback on component probe") Reported-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Closes: https://lore.kernel.org/alsa-devel/CADYyEwTNyY+fR9SgfDa-g6iiDwkU3MUdPVCYexs2_3wbcM8_vg@mail.gmail.com/ Cc: Hsin-Yi Wang <hsinyi@google.com> Tested-by: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://msgid.link/r/20231218145655.134929-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ALSA: hda/realtek: Add quirks for ASUS Zenbook 2023 ModelsStefan Binding1-0/+4
These models use 2xCS35L41amps with HDA using SPI and I2C. Models use internal and external boost. All models require DSD support to be added inside cs35l41_hda_property.c Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-8-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda: cs35l41: Support additional ASUS Zenbook 2023 ModelsStefan Binding1-0/+10
Add new model entries into configuration table. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-7-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 ModelsStefan Binding1-1/+4
These models use 2xCS35L41amps with HDA using SPI and I2C. Models use internal and external boost. All models require DSD support to be added inside cs35l41_hda_property.c Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-6-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda: cs35l41: Support additional ASUS Zenbook 2022 ModelsStefan Binding1-0/+12
Add new model entries into configuration table. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-5-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda/realtek: Add quirks for ASUS ROG 2023 modelsStefan Binding1-12/+18
These models use 2xCS35L41amps with HDA using SPI and I2C. All models use Internal Boost. Some models also use Realtek Speakers in conjunction with CS35L41. All models require DSD support to be added inside cs35l41_hda_property.c Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda: cs35l41: Support additional ASUS ROG 2023 modelsStefan Binding1-0/+36
Add new model entries into configuration table. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ALSA: hda: cs35l41: Add config table to support many laptops without _DSDStefan Binding3-42/+269
This make use of the CS35L41 HDA Property framework, which supports laptops which do not have the _DSD properties in their ACPI. Add configuration table to be able to use a generic function which allows laptops to be supported just by adding an entry into the table. Use configuration table function for existing system 103C89C6. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20231218151221.388745-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-18ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirkHans de Goede1-6/+13
Some BYTCR x86 tablets with a rt5640 codec have the left and right channels of their speakers swapped. Add a new BYT_RT5640_SWAPPED_SPEAKERS quirk for this which sets cfg-spk:swapped in the components string to let userspace know about the swapping so that the UCM profile can configure the mixer to correct this. Enable this new quirk on the Medion Lifetab S10346 which has its speakers swapped. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20231217213221.49424-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-12-18ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346Hans de Goede1-0/+12
Add a quirk for the Medion Lifetab S10346, this BYTCR tablet has no CHAN package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which is the default for BYTCR devices. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20231217213221.49424-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>