se.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) se.c (a2af050f8df6eeec29818639859f14eb237d6957)
1/*
2 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
3 *
4 * Lowlevel functions for ONKYO WAVIO SE-90PCI and SE-200PCI
5 *
6 * Copyright (c) 2007 Shin-ya Okada sh_okada(at)d4.dion.ne.jp
7 * (at) -> @
8 *

--- 239 unchanged lines hidden (view full) ---

248
249static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
250 unsigned int vol1, unsigned int vol2)
251{
252 se200pci_WM8776_write(ice, 0x0e, vol1);
253 se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100);
254}
255
1/*
2 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
3 *
4 * Lowlevel functions for ONKYO WAVIO SE-90PCI and SE-200PCI
5 *
6 * Copyright (c) 2007 Shin-ya Okada sh_okada(at)d4.dion.ne.jp
7 * (at) -> @
8 *

--- 239 unchanged lines hidden (view full) ---

248
249static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
250 unsigned int vol1, unsigned int vol2)
251{
252 se200pci_WM8776_write(ice, 0x0e, vol1);
253 se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100);
254}
255
256static const char *se200pci_sel[] = {
256static const char * const se200pci_sel[] = {
257 "LINE-IN", "CD-IN", "MIC-IN", "ALL-MIX", NULL
258};
259
260static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice,
261 unsigned int sel)
262{
263 static unsigned char vals[] = {
264 /* LINE, CD, MIC, ALL, GND */

--- 8 unchanged lines hidden (view full) ---

273{
274 /* AFL -- After Fader Listening */
275 if (afl)
276 se200pci_WM8776_write(ice, 0x16, 0x005);
277 else
278 se200pci_WM8776_write(ice, 0x16, 0x001);
279}
280
257 "LINE-IN", "CD-IN", "MIC-IN", "ALL-MIX", NULL
258};
259
260static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice,
261 unsigned int sel)
262{
263 static unsigned char vals[] = {
264 /* LINE, CD, MIC, ALL, GND */

--- 8 unchanged lines hidden (view full) ---

273{
274 /* AFL -- After Fader Listening */
275 if (afl)
276 se200pci_WM8776_write(ice, 0x16, 0x005);
277 else
278 se200pci_WM8776_write(ice, 0x16, 0x001);
279}
280
281static const char *se200pci_agc[] = {
281static const char * const se200pci_agc[] = {
282 "Off", "LimiterMode", "ALCMode", NULL
283};
284
285static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc)
286{
287 /* AGC -- Auto Gain Control of the input */
288 switch (agc) {
289 case 0:

--- 57 unchanged lines hidden (view full) ---

347static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
348{
349 se200pci_WM8740_set_pro_rate(ice, rate);
350 se200pci_WM8766_set_pro_rate(ice, rate);
351 se200pci_WM8776_set_pro_rate(ice, rate);
352}
353
354struct se200pci_control {
282 "Off", "LimiterMode", "ALCMode", NULL
283};
284
285static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc)
286{
287 /* AGC -- Auto Gain Control of the input */
288 switch (agc) {
289 case 0:

--- 57 unchanged lines hidden (view full) ---

347static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
348{
349 se200pci_WM8740_set_pro_rate(ice, rate);
350 se200pci_WM8766_set_pro_rate(ice, rate);
351 se200pci_WM8776_set_pro_rate(ice, rate);
352}
353
354struct se200pci_control {
355 char *name;
355 const char *name;
356 enum {
357 WM8766,
358 WM8776in,
359 WM8776out,
360 WM8776sel,
361 WM8776agc,
362 WM8776afl
363 } target;
364 enum { VOLUME1, VOLUME2, BOOLEAN, ENUM } type;
365 int ch;
356 enum {
357 WM8766,
358 WM8776in,
359 WM8776out,
360 WM8776sel,
361 WM8776agc,
362 WM8776afl
363 } target;
364 enum { VOLUME1, VOLUME2, BOOLEAN, ENUM } type;
365 int ch;
366 const char **member;
366 const char * const *member;
367 const char *comment;
368};
369
370static const struct se200pci_control se200pci_cont[] = {
371 {
372 .name = "Front Playback Volume",
373 .target = WM8776out,
374 .type = VOLUME1,

--- 41 unchanged lines hidden (view full) ---

416 .name = "AFL Bypass Playback Switch",
417 .target = WM8776afl,
418 .type = BOOLEAN
419 }
420};
421
422static int se200pci_get_enum_count(int n)
423{
367 const char *comment;
368};
369
370static const struct se200pci_control se200pci_cont[] = {
371 {
372 .name = "Front Playback Volume",
373 .target = WM8776out,
374 .type = VOLUME1,

--- 41 unchanged lines hidden (view full) ---

416 .name = "AFL Bypass Playback Switch",
417 .target = WM8776afl,
418 .type = BOOLEAN
419 }
420};
421
422static int se200pci_get_enum_count(int n)
423{
424 const char **member;
424 const char * const *member;
425 int c;
426
427 member = se200pci_cont[n].member;
428 if (!member)
429 return 0;
430 for (c = 0; member[c]; c++)
431 ;
432 return c;

--- 342 unchanged lines hidden ---
425 int c;
426
427 member = se200pci_cont[n].member;
428 if (!member)
429 return 0;
430 for (c = 0; member[c]; c++)
431 ;
432 return c;

--- 342 unchanged lines hidden ---