diff options
Diffstat (limited to 'sound/pci/emu10k1/emuproc.c')
-rw-r--r-- | sound/pci/emu10k1/emuproc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index 187a4e60a5fe..356fb7104253 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <sound/core.h> | 31 | #include <sound/core.h> |
32 | #include <sound/emu10k1.h> | 32 | #include <sound/emu10k1.h> |
33 | #include "p16v.h" | ||
33 | 34 | ||
34 | static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, | 35 | static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, |
35 | snd_info_buffer_t * buffer, | 36 | snd_info_buffer_t * buffer, |
@@ -62,6 +63,7 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, | |||
62 | 63 | ||
63 | if (rate_reg > 0) { | 64 | if (rate_reg > 0) { |
64 | rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); | 65 | rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); |
66 | snd_iprintf(buffer, "S/PDIF Valid : %s\n", rate & SRCS_SPDIFVALID ? "on" : "off"); | ||
65 | snd_iprintf(buffer, "S/PDIF Locked : %s\n", rate & SRCS_SPDIFLOCKED ? "on" : "off"); | 67 | snd_iprintf(buffer, "S/PDIF Locked : %s\n", rate & SRCS_SPDIFLOCKED ? "on" : "off"); |
66 | snd_iprintf(buffer, "Rate Locked : %s\n", rate & SRCS_RATELOCKED ? "on" : "off"); | 68 | snd_iprintf(buffer, "Rate Locked : %s\n", rate & SRCS_RATELOCKED ? "on" : "off"); |
67 | /* From ((Rate * 48000 ) / 262144); */ | 69 | /* From ((Rate * 48000 ) / 262144); */ |
@@ -244,6 +246,21 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, | |||
244 | #endif | 246 | #endif |
245 | } | 247 | } |
246 | 248 | ||
249 | static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, | ||
250 | snd_info_buffer_t * buffer) | ||
251 | { | ||
252 | static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 }; | ||
253 | emu10k1_t *emu = entry->private_data; | ||
254 | unsigned int val, tmp, n; | ||
255 | val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); | ||
256 | tmp = (val >> 16) & 0x8; | ||
257 | for (n=0;n<4;n++) { | ||
258 | tmp = val >> (16 + (n*4)); | ||
259 | if (tmp & 0x8) snd_iprintf(buffer, "Channel %d: Rate=%d\n", n, samplerate[tmp & 0x7]); | ||
260 | else snd_iprintf(buffer, "Channel %d: No input\n", n); | ||
261 | } | ||
262 | } | ||
263 | |||
247 | static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, | 264 | static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, |
248 | snd_info_buffer_t * buffer) | 265 | snd_info_buffer_t * buffer) |
249 | { | 266 | { |
@@ -540,6 +557,10 @@ int __devinit snd_emu10k1_proc_init(emu10k1_t * emu) | |||
540 | if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) | 557 | if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) |
541 | snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_spdif_read); | 558 | snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_spdif_read); |
542 | } | 559 | } |
560 | if (emu->card_capabilities->ca0151_chip) { | ||
561 | if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) | ||
562 | snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_rates_read); | ||
563 | } | ||
543 | 564 | ||
544 | if (! snd_card_proc_new(emu->card, "voices", &entry)) | 565 | if (! snd_card_proc_new(emu->card, "voices", &entry)) |
545 | snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_voices_read); | 566 | snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_voices_read); |