Lines Matching +full:clock +full:- +full:output +full:- +full:names

4  *   Lowlevel functions for ONKYO WAVIO SE-90PCI and SE-200PCI
6 * Copyright (c) 2007 Shin-ya Okada sh_okada(at)d4.dion.ne.jp
7 * (at) -> @
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44 /* ONKYO WAVIO SE-200PCI */
53 * AC-Link configuration ICE_EEP2_ACLINK=0x80
71 * A 2ch-DAC of main outputs.
73 * The sample-rate are automatically changed.
74 * ML/I2S (28pin) --------+
75 * MC/DM1 (27pin) -- 5V |
76 * MD/DM0 (26pin) -- GND |
77 * MUTEB (25pin) -- NC |
78 * MODE (24pin) -- GND |
79 * CSBIW (23pin) --------+
81 * RSTB (22pin) --R(1K)-+
85 * A 6ch-DAC for surrounds.
86 * It's control wire was connected to GPIOxx (3-wire serial interface)
87 * ML/I2S (11pin) -- GPIO18
88 * MC/IWL (12pin) -- GPIO17
89 * MD/DM (13pin) -- GPIO16
90 * MUTE (14pin) -- GPIO01
93 * A 2ch-ADC(with 10ch-selector) plus 2ch-DAC.
94 * It's control wire was connected to SDA/SCLK (2-wire serial interface)
95 * MODE (16pin) -- R(1K) -- GND
96 * CE (17pin) -- R(1K) -- GND 2-wire mode (address=0x34)
97 * DI (18pin) -- SDA
98 * CL (19pin) -- SCLK
101 * ** output pins and device names **
103 * 7.1ch name -- output connector color -- device (-D option)
105 * FRONT 2ch -- green -- plughw:0,0
106 * CENTER(Lch) SUBWOOFER(Rch) -- black -- plughw:0,2,0
107 * SURROUND 2ch -- orange -- plughw:0,2,1
108 * SURROUND BACK 2ch -- white -- plughw:0,2,2
141 const unsigned int CLOCK = 0x020000; in se200pci_WM8766_write() local
143 const unsigned int ALL_MASK = (DATA | CLOCK | LOAD); in se200pci_WM8766_write()
148 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction | ALL_MASK); in se200pci_WM8766_write()
149 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask & ~ALL_MASK); in se200pci_WM8766_write()
155 bits &= ~CLOCK; in se200pci_WM8766_write()
165 bits |= CLOCK; in se200pci_WM8766_write()
174 bits |= (DATA | CLOCK); in se200pci_WM8766_write()
208 se200pci_WM8766_write(ice, 0x03, 0x022); /* serial mode I2S-24bits */ in se200pci_WM8766_init()
214 se200pci_WM8766_write(ice, 0x02, 0x124); /* ch-assign L=L R=R RESET */ in se200pci_WM8766_init()
215 se200pci_WM8766_write(ice, 0x02, 0x120); /* ch-assign L=L R=R */ in se200pci_WM8766_init()
257 "LINE-IN", "CD-IN", "MIC-IN", "ALL-MIX", NULL
274 /* AFL -- After Fader Listening */ in se200pci_WM8776_set_afl()
287 /* AGC -- Auto Gain Control of the input */ in se200pci_WM8776_set_agc()
317 /* The sample-rate are automatically changed */ in se200pci_WM8776_init()
438 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in se200pci_cont_volume_info()
439 uinfo->count = 2; in se200pci_cont_volume_info()
440 uinfo->value.integer.min = 0; /* mute */ in se200pci_cont_volume_info()
441 uinfo->value.integer.max = 0xff; /* 0dB */ in se200pci_cont_volume_info()
452 n = kc->private_value; in se200pci_cont_enum_info()
455 return -EINVAL; in se200pci_cont_enum_info()
456 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; in se200pci_cont_enum_info()
457 uinfo->count = 1; in se200pci_cont_enum_info()
458 uinfo->value.enumerated.items = c; in se200pci_cont_enum_info()
459 if (uinfo->value.enumerated.item >= c) in se200pci_cont_enum_info()
460 uinfo->value.enumerated.item = c - 1; in se200pci_cont_enum_info()
461 strcpy(uinfo->value.enumerated.name, in se200pci_cont_enum_info()
462 se200pci_cont[n].member[uinfo->value.enumerated.item]); in se200pci_cont_enum_info()
470 struct se_spec *spec = ice->spec; in se200pci_cont_volume_get()
471 int n = kc->private_value; in se200pci_cont_volume_get()
472 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_volume_get()
473 uc->value.integer.value[1] = spec->vol[n].ch2; in se200pci_cont_volume_get()
481 struct se_spec *spec = ice->spec; in se200pci_cont_boolean_get()
482 int n = kc->private_value; in se200pci_cont_boolean_get()
483 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_boolean_get()
491 struct se_spec *spec = ice->spec; in se200pci_cont_enum_get()
492 int n = kc->private_value; in se200pci_cont_enum_get()
493 uc->value.enumerated.item[0] = spec->vol[n].ch1; in se200pci_cont_enum_get()
499 struct se_spec *spec = ice->spec; in se200pci_cont_update()
504 spec->vol[n].ch1, in se200pci_cont_update()
505 spec->vol[n].ch2); in se200pci_cont_update()
510 spec->vol[n].ch1, in se200pci_cont_update()
511 spec->vol[n].ch2); in se200pci_cont_update()
516 spec->vol[n].ch1, in se200pci_cont_update()
517 spec->vol[n].ch2); in se200pci_cont_update()
522 spec->vol[n].ch1); in se200pci_cont_update()
526 se200pci_WM8776_set_agc(ice, spec->vol[n].ch1); in se200pci_cont_update()
530 se200pci_WM8776_set_afl(ice, spec->vol[n].ch1); in se200pci_cont_update()
542 struct se_spec *spec = ice->spec; in se200pci_cont_volume_put()
543 int n = kc->private_value; in se200pci_cont_volume_put()
548 vol1 = uc->value.integer.value[0] & 0xff; in se200pci_cont_volume_put()
549 vol2 = uc->value.integer.value[1] & 0xff; in se200pci_cont_volume_put()
550 if (spec->vol[n].ch1 != vol1) { in se200pci_cont_volume_put()
551 spec->vol[n].ch1 = vol1; in se200pci_cont_volume_put()
554 if (spec->vol[n].ch2 != vol2) { in se200pci_cont_volume_put()
555 spec->vol[n].ch2 = vol2; in se200pci_cont_volume_put()
568 struct se_spec *spec = ice->spec; in se200pci_cont_boolean_put()
569 int n = kc->private_value; in se200pci_cont_boolean_put()
572 vol1 = !!uc->value.integer.value[0]; in se200pci_cont_boolean_put()
573 if (spec->vol[n].ch1 != vol1) { in se200pci_cont_boolean_put()
574 spec->vol[n].ch1 = vol1; in se200pci_cont_boolean_put()
585 struct se_spec *spec = ice->spec; in se200pci_cont_enum_put()
586 int n = kc->private_value; in se200pci_cont_enum_put()
589 vol1 = uc->value.enumerated.item[0]; in se200pci_cont_enum_put()
591 return -EINVAL; in se200pci_cont_enum_put()
592 if (spec->vol[n].ch1 != vol1) { in se200pci_cont_enum_put()
593 spec->vol[n].ch1 = vol1; in se200pci_cont_enum_put()
600 static const DECLARE_TLV_DB_SCALE(db_scale_gain1, -12750, 50, 1);
601 static const DECLARE_TLV_DB_SCALE(db_scale_gain2, -10350, 50, 1);
640 return -EINVAL; in se200pci_add_controls()
642 err = snd_ctl_add(ice->card, snd_ctl_new1(&cont, ice)); in se200pci_add_controls()
652 /* ONKYO WAVIO SE-90PCI */
656 * AC-Link configuration ICE_EEP2_ACLINK=0x80
663 * A 2ch-DAC of main outputs.
665 * ML/I2S (28pin) -- +5V
666 * MC/DM1 (27pin) -- GND
667 * MC/DM0 (26pin) -- GND
668 * MUTEB (25pin) -- open (internal pull-up)
669 * MODE (24pin) -- GND
670 * CSBIWO (23pin) -- +5V
687 return -ENOMEM; in se_init()
688 ice->spec = spec; in se_init()
690 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) { in se_init()
691 ice->num_total_dacs = 2; in se_init()
692 ice->num_total_adcs = 0; in se_init()
693 ice->vt1720 = 1; in se_init()
696 } else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) { in se_init()
697 ice->num_total_dacs = 8; in se_init()
698 ice->num_total_adcs = 2; in se_init()
702 ice->gpio.set_pro_rate = se200pci_set_pro_rate; in se_init()
706 return -ENOENT; in se_init()
715 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) in se_add_controls()
727 [ICE_EEP2_SYSCONF] = 0x4b, /* 49.152Hz, spdif-in/ADC, 4DACs */
729 [ICE_EEP2_I2S] = 0x78, /* 96k-ok, 24bit, 192k-ok */
730 [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */
732 [ICE_EEP2_GPIO_DIR] = 0x02, /* WM8766 mute 1=output */
734 [ICE_EEP2_GPIO_DIR2] = 0x07, /* WM8766 ML/MC/MD 1=output */
746 [ICE_EEP2_SYSCONF] = 0x4b, /* 49.152Hz, spdif-in/ADC, 4DACs */
748 [ICE_EEP2_I2S] = 0x78, /* 96k-ok, 24bit, 192k-ok */
749 [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */