41 static const char *function_names[12] = {
42 "Master Out",
"AUX Out",
"Center/LFE Out",
"SPDIF Out",
43 "Phone In",
"Mic 1",
"Mic 2",
"Line In",
"CD In",
"Video In",
46 static const char *locations[8] = {
47 "Rear I/O Panel",
"Front Panel",
"Motherboard",
"Dock/External",
48 "reserved",
"reserved",
"reserved",
"NC/unused"
51 for (
function = 0;
function < 12; ++
function) {
57 snd_iprintf(buffer,
"\n Gain Inverted Buffer delay Location\n");
61 snd_iprintf(buffer,
"%-17s: %3d.%d dBV %c %2d/fs %s\n",
62 function_names[
function],
63 (info & 0x8000 ? -1 : 1) * ((info & 0x7000) >> 12) * 3 / 2,
64 ((info & 0x0800) >> 11) * 5,
65 info & 0x0400 ?
'X' :
'-',
67 locations[sense_info >> 13]);
71 static const char *snd_ac97_stereo_enhancements[] =
73 "No 3D Stereo Enhancement",
74 "Analog Devices Phat Stereo",
75 "Creative Stereo Enhancement",
76 "National Semi 3D Stereo Enhancement",
78 "BBE 3D Stereo Enhancement",
79 "Crystal Semi 3D Stereo Enhancement",
81 "Spatializer 3D Stereo Enhancement",
82 "SRS 3D Stereo Enhancement",
83 "Platform Tech 3D Stereo Enhancement",
85 "Aureal Stereo Enhancement",
86 "Aztech 3D Enhancement",
87 "Binaura 3D Audio Enhancement",
88 "ESS Technology Stereo Enhancement",
89 "Harman International VMAx",
90 "Nvidea/IC Ensemble/KS Waves 3D Stereo Enhancement",
91 "Philips Incredible Sound",
92 "Texas Instruments 3D Stereo Enhancement",
93 "VLSI Technology 3D Stereo Enhancement",
94 "TriTech 3D Stereo Enhancement",
95 "Realtek 3D Stereo Enhancement",
96 "Samsung 3D Stereo Enhancement",
97 "Wolfson Microelectronics 3D Enhancement",
98 "Delta Integration 3D Enhancement",
99 "SigmaTel 3D Enhancement",
100 "IC Ensemble/KS Waves",
101 "Rockwell 3D Stereo Enhancement",
111 static const char *spdif_slots[4] = {
" SPDIF=3/4",
" SPDIF=7/8",
" SPDIF=6/9",
" SPDIF=10/11" };
112 static const char *spdif_rates[4] = {
" Rate=44.1kHz",
" Rate=res",
" Rate=48kHz",
" Rate=32kHz" };
113 static const char *spdif_rates_cs4205[4] = {
" Rate=48kHz",
" Rate=44.1kHz",
" Rate=res",
" Rate=res" };
114 static const char *double_rate_slots[4] = {
"10/11",
"7/8",
"reserved",
"reserved" };
117 snd_iprintf(buffer,
"%d-%d/%d: %s\n\n", ac97->
addr, ac97->
num, subidx, name);
122 snd_iprintf(buffer,
"PCI Subsys Vendor: 0x%04x\n",
124 snd_iprintf(buffer,
"PCI Subsys Device: 0x%04x\n\n",
127 snd_iprintf(buffer,
"Flags: %x\n", ac97->
flags);
134 snd_iprintf(buffer,
"Revision : 0x%02x\n", tmp & 0xff);
135 snd_iprintf(buffer,
"Compat. Class : 0x%02x\n", (tmp >> 8) & 0x1f);
136 snd_iprintf(buffer,
"Subsys. Vendor ID: 0x%04x\n",
138 snd_iprintf(buffer,
"Subsys. ID : 0x%04x\n\n",
146 snd_iprintf(buffer,
"Capabilities :%s%s%s%s%s%s\n",
154 snd_iprintf(buffer,
"DAC resolution : %s%s%s%s\n",
160 snd_iprintf(buffer,
"ADC resolution : %s%s%s%s\n",
165 snd_iprintf(buffer,
"3D enhancement : %s\n",
166 snd_ac97_stereo_enhancements[(val >> 10) & 0x1f]);
167 snd_iprintf(buffer,
"\nCurrent setup\n");
169 snd_iprintf(buffer,
"Mic gain : %s [%s]\n", val & 0x0040 ?
"+20dB" :
"+0dB", ac97->
regs[
AC97_MIC] & 0x0040 ?
"+20dB" :
"+0dB");
171 snd_iprintf(buffer,
"POP path : %s 3D\n"
173 "3D enhancement : %s\n"
177 "ADC/DAC loopback : %s\n",
178 val & 0x8000 ?
"post" :
"pre",
179 val & 0x4000 ?
"on" :
"off",
180 val & 0x2000 ?
"on" :
"off",
181 val & 0x1000 ?
"on" :
"off",
182 val & 0x0200 ?
"Mic" :
"MIX",
183 val & 0x0100 ?
"Mic2" :
"Mic1",
184 val & 0x0080 ?
"on" :
"off");
186 snd_iprintf(buffer,
"Double rate slots: %s\n",
187 double_rate_slots[(val >> 10) & 3]);
193 snd_iprintf(buffer,
"Extended ID : codec=%i rev=%i%s%s%s%s DSA=%i%s%s%s%s\n",
206 snd_iprintf(buffer,
"Extended status :%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
223 snd_iprintf(buffer,
"PCM front DAC : %iHz\n", val);
224 if (ext & AC97_EI_SDAC) {
226 snd_iprintf(buffer,
"PCM Surr DAC : %iHz\n", val);
228 if (ext & AC97_EI_LDAC) {
230 snd_iprintf(buffer,
"PCM LFE DAC : %iHz\n", val);
233 snd_iprintf(buffer,
"PCM ADC : %iHz\n", val);
237 snd_iprintf(buffer,
"PCM MIC ADC : %iHz\n", val);
245 val = 0x2000 | (val & 0xff00) >> 4 | (val & 0x38) >> 2;
249 snd_iprintf(buffer,
"SPDIF Control :%s%s%s%s Category=0x%x Generation=%i%s%s%s\n",
261 (val & AC97_SC_DRS ?
" DRS" :
""),
264 (val & AC97_SC_V ?
" Validity" :
""));
266 if ((ac97->
id & 0xfffffff0) == 0x414c4720 &&
271 snd_iprintf(buffer,
"SPDIF In Status :%s%s%s%s Category=0x%x Generation=%i",
279 snd_iprintf(buffer,
"%s Accuracy=%i%s%s\n",
282 (val & AC97_ALC650_CLOCK_LOCK ?
" Locked" :
" Unlocked"),
285 snd_iprintf(buffer,
"SPDIF In Status : Not Locked\n");
293 snd_ac97_proc_read_functions(ac97, buffer);
304 snd_iprintf(buffer,
"Extended modem ID: codec=%i%s%s%s%s%s\n",
312 snd_iprintf(buffer,
"Modem status :%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
331 snd_iprintf(buffer,
"Line1 rate : %iHz\n", val);
335 snd_iprintf(buffer,
"Line2 rate : %iHz\n", val);
339 snd_iprintf(buffer,
"Headset rate : %iHz\n", val);
350 for (idx = 0; idx < 3; idx++)
355 snd_ac97_proc_read_main(ac97, buffer, idx);
356 snd_iprintf(buffer,
"\n\n");
361 snd_iprintf(buffer,
"\nAD18XX configuration\n");
362 snd_iprintf(buffer,
"Unchained : 0x%04x,0x%04x,0x%04x\n",
366 snd_iprintf(buffer,
"Chained : 0x%04x,0x%04x,0x%04x\n",
371 snd_ac97_proc_read_main(ac97, buffer, 0);
376 #ifdef CONFIG_SND_DEBUG
384 while (!snd_info_get_line(buffer, line,
sizeof(line))) {
385 if (
sscanf(line,
"%x %x", ®, &val) != 2)
388 if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff)
399 for (reg = 0; reg < 0x80; reg += 2) {
401 snd_iprintf(buffer,
"%i:%02x = %04x\n", subidx, reg, val);
414 for (idx = 0; idx < 3; idx++)
419 snd_ac97_proc_regs_read_main(ac97, buffer, idx);
424 snd_ac97_proc_regs_read_main(ac97, buffer, 0);
437 prefix = ac97_is_audio(ac97) ?
"ac97" :
"mc97";
439 if ((entry = snd_info_create_card_entry(ac97->
bus->card, name, ac97->
bus->proc)) !=
NULL) {
440 snd_info_set_text_ops(entry, ac97, snd_ac97_proc_read);
441 if (snd_info_register(entry) < 0) {
442 snd_info_free_entry(entry);
448 if ((entry = snd_info_create_card_entry(ac97->
bus->card, name, ac97->
bus->proc)) !=
NULL) {
449 snd_info_set_text_ops(entry, ac97, snd_ac97_proc_regs_read);
450 #ifdef CONFIG_SND_DEBUG
452 entry->
c.
text.write = snd_ac97_proc_regs_write;
454 if (snd_info_register(entry) < 0) {
455 snd_info_free_entry(entry);
466 snd_info_free_entry(ac97->
proc);
476 if ((entry = snd_info_create_card_entry(bus->
card, name, bus->
card->proc_root)) !=
NULL) {
478 if (snd_info_register(entry) < 0) {
479 snd_info_free_entry(entry);
488 snd_info_free_entry(bus->
proc);