- 29 Dec, 2023 34 commits
-
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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: 3473185f ("ALSA: scarlett2: Remap Level Meter values") Link: https://lore.kernel.org/r/77e093c27402c83d0730681448fa4f57583349dd.1703001053.git.g@b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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: 9e4d5c1b ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/3b19fb3da641b587749b85fe1daa1b4e696c0c1b.1703001053.git.g@b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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: 9e4d5c1b ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/32a5fdc83b05fa74e0fcdd672fbf71d75c5f0a6d.1703001053.git.g@b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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: 9e15fae6 ("ALSA: usb-audio: scarlett2: Allow bit-level access to config") Link: https://lore.kernel.org/r/def110c5c31dbdf0a7414d258838a0a31c0fab67.1703001053.git.g@b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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: 9e4d5c1b ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/bf0a15332d852d7825fa6da87d2a0d9c0b702053.1703001053.git.g@b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
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.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Geoffrey D. Bennett authored
Add missing conversion from little-endian data to CPU-endian in scarlett2_usb_get_meter_levels(). Fixes: 3473185f ("ALSA: scarlett2: Remap Level Meter values") Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/ZYsBIE3DSKdi4YC/@m.b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Gergo Koteles authored
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: 5be27f1e ("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.huSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Gergo Koteles authored
allow driver specific driver data in tas2781-hda-i2c and tas2781-i2c Fixes: ef3bcde7 ("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.huSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Gergo Koteles authored
Correct typos. Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/ead5609d63e71e8e87c13e1767decca5b272d696.1703203812.git.soyer@irl.huSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Gergo Koteles authored
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: 5be27f1e ("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.huSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 21 Dec, 2023 3 commits
-
-
Stefan Binding authored
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: 8c4c216d ("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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
Initialise the variables to NULL so that they cannot be uninitialised when devm_kfree is called. Found by static analysis. Fixes: 8c4c216d ("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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Merge tag 'asoc-fix-v6.7-rc7' of 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.
-
- 19 Dec, 2023 2 commits
-
-
Shengjiu Wang authored
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: 3e4a8261 ("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.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
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: 15be353d ("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.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 18 Dec, 2023 1 commit
-
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-