diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-04-16 09:15:45 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 12:00:37 +0200 |
commit | 4972a177fed34036498aee555335f84a70219bc1 (patch) | |
tree | 343c9beb57407db5111d88de2c9c97498bc91777 /sound/pci/oxygen/oxygen_mixer.c | |
parent | e983532e446ac7fabe829d9e3aeff8e26b0a277d (diff) |
[ALSA] oxygen: generalize DAC volume TLV handling
Add a pointer for DAC volume TLV data to the model structure so that the
model driver do not need to manually assign it in their control filter.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_mixer.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_mixer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c index 056581ecd91..cc0cddadd58 100644 --- a/sound/pci/oxygen/oxygen_mixer.c +++ b/sound/pci/oxygen/oxygen_mixer.c @@ -941,6 +941,11 @@ static int add_controls(struct oxygen *chip, return err; if (err == 1) continue; + if (!strcmp(template.name, "Master Playback Volume") && + chip->model->dac_tlv) { + template.tlv.p = chip->model->dac_tlv; + template.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; + } ctl = snd_ctl_new1(&template, chip); if (!ctl) return -ENOMEM; |