diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-18 07:05:50 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:12 -0400 |
commit | 1c82ed1bc531746a8fa9b46c593ddce546f28026 (patch) | |
tree | bc86ba78100f31856cff9b596634d795d2793984 /sound/pci/hda/patch_analog.c | |
parent | e922b0028fad87de0d262f9fa51f98595d2df258 (diff) |
[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 <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 { | |||
80 | #endif | 80 | #endif |
81 | /* for virtual master */ | 81 | /* for virtual master */ |
82 | hda_nid_t vmaster_nid; | 82 | hda_nid_t vmaster_nid; |
83 | u32 vmaster_tlv[4]; | ||
84 | const char **slave_vols; | 83 | const char **slave_vols; |
85 | const char **slave_sws; | 84 | const char **slave_sws; |
86 | }; | 85 | }; |
@@ -185,10 +184,11 @@ static int ad198x_build_controls(struct hda_codec *codec) | |||
185 | 184 | ||
186 | /* if we have no master control, let's create it */ | 185 | /* if we have no master control, let's create it */ |
187 | if (!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { | 186 | if (!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { |
187 | unsigned int vmaster_tlv[4]; | ||
188 | snd_hda_set_vmaster_tlv(codec, spec->vmaster_nid, | 188 | snd_hda_set_vmaster_tlv(codec, spec->vmaster_nid, |
189 | HDA_OUTPUT, spec->vmaster_tlv); | 189 | HDA_OUTPUT, vmaster_tlv); |
190 | err = snd_hda_add_vmaster(codec, "Master Playback Volume", | 190 | err = snd_hda_add_vmaster(codec, "Master Playback Volume", |
191 | spec->vmaster_tlv, | 191 | vmaster_tlv, |
192 | (spec->slave_vols ? | 192 | (spec->slave_vols ? |
193 | spec->slave_vols : ad_slave_vols)); | 193 | spec->slave_vols : ad_slave_vols)); |
194 | if (err < 0) | 194 | if (err < 0) |