From 1c82ed1bc531746a8fa9b46c593ddce546f28026 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 18 Feb 2008 13:05:50 +0100 Subject: [ALSA] Keep private TLV entry in vmaster itself Use a private array for TLV entries of virtual master controls instead of (supposed) static array. This cleans up the existing codes. Also, now vmaster assumes the simple dB-range TLV that is the only type it can handle. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_analog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/pci/hda/patch_analog.c') diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 3f3905cc4e01..e0f3559f8b13 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -80,7 +80,6 @@ struct ad198x_spec { #endif /* for virtual master */ hda_nid_t vmaster_nid; - u32 vmaster_tlv[4]; const char **slave_vols; const char **slave_sws; }; @@ -185,10 +184,11 @@ static int ad198x_build_controls(struct hda_codec *codec) /* if we have no master control, let's create it */ if (!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { + unsigned int vmaster_tlv[4]; snd_hda_set_vmaster_tlv(codec, spec->vmaster_nid, - HDA_OUTPUT, spec->vmaster_tlv); + HDA_OUTPUT, vmaster_tlv); err = snd_hda_add_vmaster(codec, "Master Playback Volume", - spec->vmaster_tlv, + vmaster_tlv, (spec->slave_vols ? spec->slave_vols : ad_slave_vols)); if (err < 0) -- cgit v1.2.3