From b6ca8ab399d913eed0d89d65d6b768337a3d20d7 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 4 Oct 2010 13:21:52 +0200 Subject: ALSA: oxygen: handle CD input configuration with a flag There are more models without a CD input than with one, so handle this explicitly with a device_config flag to avoid having to define a control filter callback to filter it out. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- sound/pci/oxygen/oxygen_mixer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/pci/oxygen/oxygen_mixer.c') diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c index f375b8a2786..7d40ba8db9f 100644 --- a/sound/pci/oxygen/oxygen_mixer.c +++ b/sound/pci/oxygen/oxygen_mixer.c @@ -972,6 +972,9 @@ static int add_controls(struct oxygen *chip, if (!strcmp(template.name, "Stereo Upmixing") && chip->model.dac_channels == 2) continue; + if (!strncmp(template.name, "CD Capture ", 11) && + !(chip->model.device_config & AC97_CD_INPUT)) + continue; if (!strcmp(template.name, "Master Playback Volume") && chip->model.dac_tlv) { template.tlv.p = chip->model.dac_tlv; -- cgit v1.2.3-70-g09d2