ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization
The previous fix for addressing the breakage in vmaster slave initialization, commita91d66129f
("ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal"), introduced a new helper to process over each slave kctl. However, this helper passes only the original kctl, not the virtual slave kctl. As a result, HD-audio driver (which is the only user so far) couldn't initialize the slave correctly because it's trying to update the value directly with the original kctl, not with the mapped kctl. This patch fixes the situation again by passing both the mapped slaved and original slave kctls to the function. Luckily there is a single caller as of now, so changing the call signature is no big matter. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197959 Fixes:a91d66129f
("ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -495,7 +495,9 @@ EXPORT_SYMBOL_GPL(snd_ctl_sync_vmaster);
|
||||
* Returns 0 if successful, or a negative error code.
|
||||
*/
|
||||
int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
|
||||
int (*func)(struct snd_kcontrol *, void *),
|
||||
int (*func)(struct snd_kcontrol *vslave,
|
||||
struct snd_kcontrol *slave,
|
||||
void *arg),
|
||||
void *arg)
|
||||
{
|
||||
struct link_master *master;
|
||||
@@ -507,7 +509,7 @@ int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
|
||||
if (err < 0)
|
||||
return err;
|
||||
list_for_each_entry(slave, &master->slaves, list) {
|
||||
err = func(&slave->slave, arg);
|
||||
err = func(slave->kctl, &slave->slave, arg);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user