diff options
Diffstat (limited to 'sound/pci/oxygen/hifier.c')
-rw-r--r-- | sound/pci/oxygen/hifier.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index 666f69a3312e..090dd4354a28 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c | |||
@@ -66,12 +66,12 @@ static void hifier_init(struct oxygen *chip) | |||
66 | { | 66 | { |
67 | struct hifier_data *data = chip->model_data; | 67 | struct hifier_data *data = chip->model_data; |
68 | 68 | ||
69 | data->ak4396_ctl2 = AK4396_DEM_OFF | AK4396_DFS_NORMAL; | 69 | data->ak4396_ctl2 = AK4396_SMUTE | AK4396_DEM_OFF | AK4396_DFS_NORMAL; |
70 | ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN); | 70 | ak4396_write(chip, AK4396_CONTROL_1, AK4396_DIF_24_MSB | AK4396_RSTN); |
71 | ak4396_write(chip, AK4396_CONTROL_2, data->ak4396_ctl2); | 71 | ak4396_write(chip, AK4396_CONTROL_2, data->ak4396_ctl2); |
72 | ak4396_write(chip, AK4396_CONTROL_3, AK4396_PCM); | 72 | ak4396_write(chip, AK4396_CONTROL_3, AK4396_PCM); |
73 | ak4396_write(chip, AK4396_LCH_ATT, 0xff); | 73 | ak4396_write(chip, AK4396_LCH_ATT, 0); |
74 | ak4396_write(chip, AK4396_RCH_ATT, 0xff); | 74 | ak4396_write(chip, AK4396_RCH_ATT, 0); |
75 | 75 | ||
76 | snd_component_add(chip->card, "AK4396"); | 76 | snd_component_add(chip->card, "AK4396"); |
77 | snd_component_add(chip->card, "CS5340"); | 77 | snd_component_add(chip->card, "CS5340"); |
@@ -127,22 +127,8 @@ static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); | |||
127 | 127 | ||
128 | static int hifier_control_filter(struct snd_kcontrol_new *template) | 128 | static int hifier_control_filter(struct snd_kcontrol_new *template) |
129 | { | 129 | { |
130 | if (!strcmp(template->name, "Master Playback Volume")) { | 130 | if (!strcmp(template->name, "Stereo Upmixing")) |
131 | template->access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; | ||
132 | template->tlv.p = ak4396_db_scale; | ||
133 | } else if (!strcmp(template->name, "Stereo Upmixing")) { | ||
134 | return 1; /* stereo only - we don't need upmixing */ | 131 | return 1; /* stereo only - we don't need upmixing */ |
135 | } else if (!strcmp(template->name, | ||
136 | SNDRV_CTL_NAME_IEC958("", CAPTURE, MASK)) || | ||
137 | !strcmp(template->name, | ||
138 | SNDRV_CTL_NAME_IEC958("", CAPTURE, DEFAULT))) { | ||
139 | return 1; /* no digital input */ | ||
140 | } | ||
141 | return 0; | ||
142 | } | ||
143 | |||
144 | static int hifier_mixer_init(struct oxygen *chip) | ||
145 | { | ||
146 | return 0; | 132 | return 0; |
147 | } | 133 | } |
148 | 134 | ||
@@ -153,18 +139,20 @@ static const struct oxygen_model model_hifier = { | |||
153 | .owner = THIS_MODULE, | 139 | .owner = THIS_MODULE, |
154 | .init = hifier_init, | 140 | .init = hifier_init, |
155 | .control_filter = hifier_control_filter, | 141 | .control_filter = hifier_control_filter, |
156 | .mixer_init = hifier_mixer_init, | ||
157 | .cleanup = hifier_cleanup, | 142 | .cleanup = hifier_cleanup, |
158 | .set_dac_params = set_ak4396_params, | 143 | .set_dac_params = set_ak4396_params, |
159 | .set_adc_params = set_cs5340_params, | 144 | .set_adc_params = set_cs5340_params, |
160 | .update_dac_volume = update_ak4396_volume, | 145 | .update_dac_volume = update_ak4396_volume, |
161 | .update_dac_mute = update_ak4396_mute, | 146 | .update_dac_mute = update_ak4396_mute, |
147 | .dac_tlv = ak4396_db_scale, | ||
162 | .model_data_size = sizeof(struct hifier_data), | 148 | .model_data_size = sizeof(struct hifier_data), |
149 | .pcm_dev_cfg = PLAYBACK_0_TO_I2S | | ||
150 | PLAYBACK_1_TO_SPDIF | | ||
151 | CAPTURE_0_FROM_I2S_1, | ||
163 | .dac_channels = 2, | 152 | .dac_channels = 2, |
164 | .used_channels = OXYGEN_CHANNEL_A | | 153 | .dac_volume_min = 0, |
165 | OXYGEN_CHANNEL_SPDIF | | 154 | .dac_volume_max = 255, |
166 | OXYGEN_CHANNEL_MULTICH, | 155 | .function_flags = OXYGEN_FUNCTION_SPI, |
167 | .function_flags = 0, | ||
168 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 156 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
169 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 157 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
170 | }; | 158 | }; |
@@ -181,7 +169,7 @@ static int __devinit hifier_probe(struct pci_dev *pci, | |||
181 | ++dev; | 169 | ++dev; |
182 | return -ENOENT; | 170 | return -ENOENT; |
183 | } | 171 | } |
184 | err = oxygen_pci_probe(pci, index[dev], id[dev], 0, &model_hifier); | 172 | err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier); |
185 | if (err >= 0) | 173 | if (err >= 0) |
186 | ++dev; | 174 | ++dev; |
187 | return err; | 175 | return err; |