21 #include <linux/kernel.h>
35 snd_iprintf(buffer,
"Node 0x%02x %s wcaps 0x%x\n", nid, name, val);
37 snd_iprintf(buffer,
" Formats: 0x%x\n", val);
41 struct lola *
chip,
int nid,
unsigned int ampcap,
47 snd_iprintf(buffer,
"Node 0x%02x %s wcaps 0x%x\n", nid, name, val);
48 if (val == 0x00400200)
51 snd_iprintf(buffer,
" Amp-Caps: 0x%x\n", val);
52 snd_iprintf(buffer,
" mute=%d, step-size=%d, steps=%d, ofs=%d\n",
58 snd_iprintf(buffer,
" Max-level: 0x%x\n", val);
62 struct lola *chip,
int nid)
68 snd_iprintf(buffer,
"Node 0x%02x [Clock] wcaps 0x%x\n", nid, val);
69 num_clocks = val & 0xff;
70 for (i = 0; i < num_clocks; i += 4) {
72 unsigned short items[4];
77 items[0] = val & 0xfff;
78 items[1] = (val >> 16) & 0xfff;
79 items[2] = res_ex & 0xfff;
80 items[3] = (res_ex >> 16) & 0xfff;
81 for (j = 0; j < 4; j++) {
82 unsigned char type = items[
j] >> 8;
83 unsigned int freq = items[
j] & 0xff;
84 if (i + j >= num_clocks)
95 snd_iprintf(buffer,
" Clock %d: Type %d:%s, freq=%d\n",
96 i + j, type, name, freq);
102 struct lola *chip,
int nid)
107 snd_iprintf(buffer,
"Node 0x%02x [Mixer] wcaps 0x%x\n", nid, val);
118 snd_iprintf(buffer,
"Vendor: 0x%08x\n", val);
120 snd_iprintf(buffer,
"Function Type: %d\n", val);
122 snd_iprintf(buffer,
"Specific-Caps: 0x%08x\n", val);
123 snd_iprintf(buffer,
" Pins-In %d, Pins-Out %d\n",
126 for (i = 0; i < chip->
pcm[
CAPT].num_streams; i++, nid++)
127 print_audio_widget(buffer, chip, nid,
"[Audio-In]");
128 for (i = 0; i < chip->
pcm[
PLAY].num_streams; i++, nid++)
129 print_audio_widget(buffer, chip, nid,
"[Audio-Out]");
130 for (i = 0; i < chip->
pin[
CAPT].num_pins; i++, nid++)
133 for (i = 0; i < chip->
pin[
PLAY].num_pins; i++, nid++)
137 print_clock_widget(buffer, chip, nid);
141 print_mixer_widget(buffer, chip, nid);
147 static void lola_proc_codec_rw_write(
struct snd_info_entry *entry,
153 while (!snd_info_get_line(buffer, line,
sizeof(line))) {
154 if (
sscanf(line,
"%i %i %i %i", &
id, &verb, &data, &extdata) != 4)
178 for (i = 0; i < 0x40; i += 4) {
179 snd_iprintf(buffer,
"BAR0 %02x: %08x\n", i,
182 snd_iprintf(buffer,
"\n");
183 for (i = 0; i < 0x30; i += 4) {
184 snd_iprintf(buffer,
"BAR1 %02x: %08x\n", i,
187 snd_iprintf(buffer,
"\n");
188 for (i = 0x80; i < 0xa0; i += 4) {
189 snd_iprintf(buffer,
"BAR1 %02x: %08x\n", i,
192 snd_iprintf(buffer,
"\n");
193 for (i = 0; i < 32; i++) {
194 snd_iprintf(buffer,
"DSD %02x STS %08x\n", i,
196 snd_iprintf(buffer,
"DSD %02x LPIB %08x\n", i,
198 snd_iprintf(buffer,
"DSD %02x CTL %08x\n", i,
200 snd_iprintf(buffer,
"DSD %02x LVIL %08x\n", i,
202 snd_iprintf(buffer,
"DSD %02x BDPL %08x\n", i,
204 snd_iprintf(buffer,
"DSD %02x BDPU %08x\n", i,
213 if (!snd_card_proc_new(chip->
card,
"codec", &entry))
214 snd_info_set_text_ops(entry, chip, lola_proc_codec_read);
215 if (!snd_card_proc_new(chip->
card,
"codec_rw", &entry)) {
216 snd_info_set_text_ops(entry, chip, lola_proc_codec_rw_read);
218 entry->
c.
text.write = lola_proc_codec_rw_write;
220 if (!snd_card_proc_new(chip->
card,
"regs", &entry))
221 snd_info_set_text_ops(entry, chip, lola_proc_regs_read);