Lines Matching +full:0 +full:xcfff

39 		 "(in second, 0 = disable).");
55 { 0x41445300, 0xffffff00, "Analog Devices", NULL, NULL },
56 { 0x414b4d00, 0xffffff00, "Asahi Kasei", NULL, NULL },
57 { 0x414c4300, 0xffffff00, "Realtek", NULL, NULL },
58 { 0x414c4700, 0xffffff00, "Realtek", NULL, NULL },
64 { 0x415a5400, 0xffffff00, "Aztech Labs (emulated)", NULL, NULL },
65 { 0x434d4900, 0xffffff00, "C-Media Electronics", NULL, NULL },
66 { 0x43525900, 0xffffff00, "Cirrus Logic", NULL, NULL },
67 { 0x43585400, 0xffffff00, "Conexant", NULL, NULL },
68 { 0x44543000, 0xffffff00, "Diamond Technology", NULL, NULL },
69 { 0x454d4300, 0xffffff00, "eMicro", NULL, NULL },
70 { 0x45838300, 0xffffff00, "ESS Technology", NULL, NULL },
71 { 0x48525300, 0xffffff00, "Intersil", NULL, NULL },
72 { 0x49434500, 0xffffff00, "ICEnsemble", NULL, NULL },
73 { 0x49544500, 0xffffff00, "ITE Tech.Inc", NULL, NULL },
74 { 0x4e534300, 0xffffff00, "National Semiconductor", NULL, NULL },
75 { 0x50534300, 0xffffff00, "Philips", NULL, NULL },
76 { 0x53494c00, 0xffffff00, "Silicon Laboratory", NULL, NULL },
77 { 0x53544d00, 0xffffff00, "STMicroelectronics", NULL, NULL },
78 { 0x54524100, 0xffffff00, "TriTech", NULL, NULL },
79 { 0x54584e00, 0xffffff00, "Texas Instruments", NULL, NULL },
80 { 0x56494100, 0xffffff00, "VIA Technologies", NULL, NULL },
81 { 0x57454300, 0xffffff00, "Winbond", NULL, NULL },
82 { 0x574d4c00, 0xffffff00, "Wolfson", NULL, NULL },
83 { 0x594d4800, 0xffffff00, "Yamaha", NULL, NULL },
84 { 0x83847600, 0xffffff00, "SigmaTel", NULL, NULL },
85 { 0, 0, NULL, NULL, NULL }
89 { 0x41445303, 0xffffffff, "AD1819", patch_ad1819, NULL },
90 { 0x41445340, 0xffffffff, "AD1881", patch_ad1881, NULL },
91 { 0x41445348, 0xffffffff, "AD1881A", patch_ad1881, NULL },
92 { 0x41445360, 0xffffffff, "AD1885", patch_ad1885, NULL },
93 { 0x41445361, 0xffffffff, "AD1886", patch_ad1886, NULL },
94 { 0x41445362, 0xffffffff, "AD1887", patch_ad1881, NULL },
95 { 0x41445363, 0xffffffff, "AD1886A", patch_ad1881, NULL },
96 { 0x41445368, 0xffffffff, "AD1888", patch_ad1888, NULL },
97 { 0x41445370, 0xffffffff, "AD1980", patch_ad1980, NULL },
98 { 0x41445372, 0xffffffff, "AD1981A", patch_ad1981a, NULL },
99 { 0x41445374, 0xffffffff, "AD1981B", patch_ad1981b, NULL },
100 { 0x41445375, 0xffffffff, "AD1985", patch_ad1985, NULL },
101 { 0x41445378, 0xffffffff, "AD1986", patch_ad1986, NULL },
102 { 0x414b4d00, 0xffffffff, "AK4540", NULL, NULL },
103 { 0x414b4d01, 0xffffffff, "AK4542", NULL, NULL },
104 { 0x414b4d02, 0xffffffff, "AK4543", NULL, NULL },
105 { 0x414b4d06, 0xffffffff, "AK4544A", NULL, NULL },
106 { 0x414b4d07, 0xffffffff, "AK4545", NULL, NULL },
107 { 0x414c4300, 0xffffff00, "ALC100,100P", NULL, NULL },
108 { 0x414c4710, 0xfffffff0, "ALC200,200P", NULL, NULL },
109 { 0x414c4721, 0xffffffff, "ALC650D", NULL, NULL }, /* already patched */
110 { 0x414c4722, 0xffffffff, "ALC650E", NULL, NULL }, /* already patched */
111 { 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */
112 { 0x414c4720, 0xfffffff0, "ALC650", patch_alc650, NULL },
113 { 0x414c4730, 0xffffffff, "ALC101", NULL, NULL },
114 { 0x414c4740, 0xfffffff0, "ALC202", NULL, NULL },
115 { 0x414c4750, 0xfffffff0, "ALC250", NULL, NULL },
116 { 0x414c4760, 0xfffffff0, "ALC655", patch_alc655, NULL },
117 { 0x414c4770, 0xfffffff0, "ALC203", patch_alc203, NULL },
118 { 0x414c4781, 0xffffffff, "ALC658D", NULL, NULL }, /* already patched */
119 { 0x414c4780, 0xfffffff0, "ALC658", patch_alc655, NULL },
120 { 0x414c4790, 0xfffffff0, "ALC850", patch_alc850, NULL },
121 { 0x415a5401, 0xffffffff, "AZF3328", patch_aztech_azf3328, NULL },
122 { 0x434d4941, 0xffffffff, "CMI9738", patch_cm9738, NULL },
123 { 0x434d4961, 0xffffffff, "CMI9739", patch_cm9739, NULL },
124 { 0x434d4969, 0xffffffff, "CMI9780", patch_cm9780, NULL },
125 { 0x434d4978, 0xffffffff, "CMI9761A", patch_cm9761, NULL },
126 { 0x434d4982, 0xffffffff, "CMI9761B", patch_cm9761, NULL },
127 { 0x434d4983, 0xffffffff, "CMI9761A+", patch_cm9761, NULL },
128 { 0x43525900, 0xfffffff8, "CS4297", NULL, NULL },
129 { 0x43525910, 0xfffffff8, "CS4297A", patch_cirrus_spdif, NULL },
130 { 0x43525920, 0xfffffff8, "CS4298", patch_cirrus_spdif, NULL },
131 { 0x43525928, 0xfffffff8, "CS4294", NULL, NULL },
132 { 0x43525930, 0xfffffff8, "CS4299", patch_cirrus_cs4299, NULL },
133 { 0x43525948, 0xfffffff8, "CS4201", NULL, NULL },
134 { 0x43525958, 0xfffffff8, "CS4205", patch_cirrus_spdif, NULL },
135 { 0x43525960, 0xfffffff8, "CS4291", NULL, NULL },
136 { 0x43525970, 0xfffffff8, "CS4202", NULL, NULL },
137 { 0x43585421, 0xffffffff, "HSD11246", NULL, NULL }, // SmartMC II
138 { 0x43585428, 0xfffffff8, "Cx20468", patch_conexant, NULL }, // SmartAMC fixme: the mask might be …
139 { 0x43585430, 0xffffffff, "Cx20468-31", patch_conexant, NULL },
140 { 0x43585431, 0xffffffff, "Cx20551", patch_cx20551, NULL },
141 { 0x44543031, 0xfffffff0, "DT0398", NULL, NULL },
142 { 0x454d4328, 0xffffffff, "EM28028", NULL, NULL }, // same as TR28028?
143 { 0x45838308, 0xffffffff, "ESS1988", NULL, NULL },
144 { 0x48525300, 0xffffff00, "HMP9701", NULL, NULL },
145 { 0x49434501, 0xffffffff, "ICE1230", NULL, NULL },
146 { 0x49434511, 0xffffffff, "ICE1232", NULL, NULL }, // alias VIA VT1611A?
147 { 0x49434514, 0xffffffff, "ICE1232A", NULL, NULL },
148 { 0x49434551, 0xffffffff, "VT1616", patch_vt1616, NULL },
149 { 0x49434552, 0xffffffff, "VT1616i", patch_vt1616, NULL }, // VT1616 compatible (chipset integrate…
150 { 0x49544520, 0xffffffff, "IT2226E", NULL, NULL },
151 { 0x49544561, 0xffffffff, "IT2646E", patch_it2646, NULL },
152 { 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk
153 { 0x4e534331, 0xffffffff, "LM4549", NULL, NULL },
154 { 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix
155 { 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL },
156 { 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH },
157 { 0x53544d02, 0xffffffff, "ST7597", NULL, NULL },
158 { 0x54524102, 0xffffffff, "TR28022", NULL, NULL },
159 { 0x54524103, 0xffffffff, "TR28023", NULL, NULL },
160 { 0x54524106, 0xffffffff, "TR28026", NULL, NULL },
161 { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99]
162 { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (…
163 { 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL },
164 { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL },
165 { 0x56494120, 0xfffffff0, "VIA1613", patch_vt1613, NULL },
166 { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF
167 { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF
168 { 0x56494182, 0xffffffff, "VIA1618", patch_vt1618, NULL },
169 { 0x57454301, 0xffffffff, "W83971D", NULL, NULL },
170 { 0x574d4c00, 0xffffffff, "WM9701,WM9701A", NULL, NULL },
171 { 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL},
172 { 0x574d4C04, 0xffffffff, "WM9704M,WM9704Q", patch_wolfson04, NULL},
173 { 0x574d4C05, 0xffffffff, "WM9705,WM9710", patch_wolfson05, NULL},
174 { 0x574d4C09, 0xffffffff, "WM9709", NULL, NULL},
175 { 0x574d4C12, 0xffffffff, "WM9711,WM9712,WM9715", patch_wolfson11, NULL},
176 { 0x574d4c13, 0xffffffff, "WM9713,WM9714", patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF},
177 { 0x594d4800, 0xffffffff, "YMF743", patch_yamaha_ymf743, NULL },
178 { 0x594d4802, 0xffffffff, "YMF752", NULL, NULL },
179 { 0x594d4803, 0xffffffff, "YMF753", patch_yamaha_ymf753, NULL },
180 { 0x83847600, 0xffffffff, "STAC9700,83,84", patch_sigmatel_stac9700, NULL },
181 { 0x83847604, 0xffffffff, "STAC9701,3,4,5", NULL, NULL },
182 { 0x83847605, 0xffffffff, "STAC9704", NULL, NULL },
183 { 0x83847608, 0xffffffff, "STAC9708,11", patch_sigmatel_stac9708, NULL },
184 { 0x83847609, 0xffffffff, "STAC9721,23", patch_sigmatel_stac9721, NULL },
185 { 0x83847644, 0xffffffff, "STAC9744", patch_sigmatel_stac9744, NULL },
186 { 0x83847650, 0xffffffff, "STAC9750,51", NULL, NULL }, // patch?
187 { 0x83847652, 0xffffffff, "STAC9752,53", NULL, NULL }, // patch?
188 { 0x83847656, 0xffffffff, "STAC9756,57", patch_sigmatel_stac9756, NULL },
189 { 0x83847658, 0xffffffff, "STAC9758,59", patch_sigmatel_stac9758, NULL },
190 { 0x83847666, 0xffffffff, "STAC9766,67", NULL, NULL }, // patch?
191 { 0, 0, NULL, NULL, NULL }
200 #define ac97_is_power_save_mode(ac97) 0
219 if (reg == 0x08) in snd_ac97_valid_reg()
220 return 0; in snd_ac97_valid_reg()
223 if (reg == 0x22 || reg == 0x7a) in snd_ac97_valid_reg()
228 if (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c) in snd_ac97_valid_reg()
230 return 0; in snd_ac97_valid_reg()
234 if (reg >= 0x3a && reg <= 0x6e) /* 0x59 */ in snd_ac97_valid_reg()
235 return 0; in snd_ac97_valid_reg()
241 if (reg == 0x5a) in snd_ac97_valid_reg()
243 if (reg >= 0x3c && reg <= 0x6e) /* 0x59 */ in snd_ac97_valid_reg()
244 return 0; in snd_ac97_valid_reg()
253 if (reg <= 0x3a || reg >= 0x5a) in snd_ac97_valid_reg()
255 return 0; in snd_ac97_valid_reg()
276 if ((ac97->id & 0xffffff00) == AC97_ID_ALC100) { in snd_ac97_write()
279 ac97->bus->ops->write(ac97, AC97_RESET, 0); /* reset audio codec */ in snd_ac97_write()
300 return 0; in snd_ac97_read()
348 * Return: 1 if the value is changed, 0 if no change, or a negative
380 * Return: 1 if the bits are changed, 0 if no change, or a negative
430 (cfg & ~0x7000) | in snd_ac97_ad18xx_update_pcm_bits()
436 cfg | 0x7000); in snd_ac97_ad18xx_update_pcm_bits()
466 ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1); in snd_ac97_get_enum_double()
470 return 0; in snd_ac97_get_enum_double()
483 if (ucontrol->value.enumerated.item[0] > e->mask - 1) in snd_ac97_put_enum_double()
485 val = ucontrol->value.enumerated.item[0] << e->shift_l; in snd_ac97_put_enum_double()
502 (reg >= 0x60 && reg < 0x70)) { in snd_ac97_page_save()
503 unsigned short page = (kcontrol->private_value >> 26) & 0x0f; in snd_ac97_page_save()
513 if (page_save >= 0) { in snd_ac97_page_restore()
523 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_info_volsw()
524 int shift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_info_volsw()
525 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_info_volsw()
529 uinfo->value.integer.min = 0; in snd_ac97_info_volsw()
531 return 0; in snd_ac97_info_volsw()
538 int reg = kcontrol->private_value & 0xff; in snd_ac97_get_volsw()
539 int shift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_get_volsw()
540 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_get_volsw()
541 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_get_volsw()
542 int invert = (kcontrol->private_value >> 24) & 0x01; in snd_ac97_get_volsw()
546 ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift) & mask; in snd_ac97_get_volsw()
550 ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0]; in snd_ac97_get_volsw()
555 return 0; in snd_ac97_get_volsw()
562 int reg = kcontrol->private_value & 0xff; in snd_ac97_put_volsw()
563 int shift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_put_volsw()
564 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_put_volsw()
565 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_put_volsw()
566 int invert = (kcontrol->private_value >> 24) & 0x01; in snd_ac97_put_volsw()
571 val = (ucontrol->value.integer.value[0] & mask); in snd_ac97_put_volsw()
601 AC97_SINGLE("Tone Control - Treble", AC97_MASTER_TONE, 0, 15, 1)
610 AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0);
619 AC97_ENUM_DOUBLE(AC97_REC_SEL, 8, 0, 8, std_rec_sel),
626 AC97_ENUM("Capture Source", std_enum[0]);
629 AC97_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0);
633 AC97_SINGLE("Mic Capture Volume", AC97_REC_GAIN_MIC, 0, 15, 0)
637 AC97_GENERAL_PCM_OUT = 0,
648 AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0),
649 AC97_SINGLE("3D Control - Switch", AC97_GENERAL_PURPOSE, 13, 1, 0),
650 AC97_SINGLE("Loudness (bass boost)", AC97_GENERAL_PURPOSE, 12, 1, 0),
653 AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0)
657 AC97_SINGLE("3D Control - Center", AC97_3D_CONTROL, 8, 15, 0),
658 AC97_SINGLE("3D Control - Depth", AC97_3D_CONTROL, 0, 15, 0)
663 AC97_SINGLE("Center Playback Volume", AC97_CENTER_LFE_MASTER, 0, 31, 1)
675 AC97_SINGLE("Off-hook Switch", AC97_GPIO_STATUS, 0, 1, 0),
676 AC97_SINGLE("Caller ID Switch", AC97_GPIO_STATUS, 2, 1, 0)
682 kctl->private_value = AC97_SINGLE_VALUE(AC97_POWERDOWN, 15, 1, 0); in set_inv_eapd()
691 return 0; in snd_ac97_spdif_mask_info()
696 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | in snd_ac97_spdif_cmask_get()
703 return 0; in snd_ac97_spdif_cmask_get()
709 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | in snd_ac97_spdif_pmask_get()
713 return 0; in snd_ac97_spdif_pmask_get()
721 ucontrol->value.iec958.status[0] = ac97->spdif_status & 0xff; in snd_ac97_spdif_default_get()
722 ucontrol->value.iec958.status[1] = (ac97->spdif_status >> 8) & 0xff; in snd_ac97_spdif_default_get()
723 ucontrol->value.iec958.status[2] = (ac97->spdif_status >> 16) & 0xff; in snd_ac97_spdif_default_get()
724 ucontrol->value.iec958.status[3] = (ac97->spdif_status >> 24) & 0xff; in snd_ac97_spdif_default_get()
726 return 0; in snd_ac97_spdif_default_get()
732 unsigned int new = 0; in snd_ac97_spdif_default_put()
733 unsigned short val = 0; in snd_ac97_spdif_default_put()
736 new = val = ucontrol->value.iec958.status[0] & (IEC958_AES0_PROFESSIONAL|IEC958_AES0_NONAUDIO); in snd_ac97_spdif_default_put()
737 if (ucontrol->value.iec958.status[0] & IEC958_AES0_PROFESSIONAL) { in snd_ac97_spdif_default_put()
738 new |= ucontrol->value.iec958.status[0] & (IEC958_AES0_PRO_FS|IEC958_AES0_PRO_EMPHASIS_5015); in snd_ac97_spdif_default_put()
740 case IEC958_AES0_PRO_FS_44100: val |= 0<<12; break; in snd_ac97_spdif_default_put()
748 …new |= ucontrol->value.iec958.status[0] & (IEC958_AES0_CON_EMPHASIS_5015|IEC958_AES0_CON_NOT_COPYR… in snd_ac97_spdif_default_put()
755 val |= ((new >> 8) & 0xff) << 4; // category + original in snd_ac97_spdif_default_put()
756 switch ((new >> 24) & 0xff) { in snd_ac97_spdif_default_put()
757 case IEC958_AES3_CON_FS_44100: val |= 0<<12; break; in snd_ac97_spdif_default_put()
769 int x = (val >> 12) & 0x03; in snd_ac97_spdif_default_put()
771 case 0: x = 1; break; // 44.1 in snd_ac97_spdif_default_put()
772 case 2: x = 0; break; // 48.0 in snd_ac97_spdif_default_put()
773 default: x = 0; break; // illegal. in snd_ac97_spdif_default_put()
775 change |= snd_ac97_update_bits_nolock(ac97, AC97_CSR_SPDIF, 0x3fff, ((val & 0xcfff) | (x << 12))); in snd_ac97_spdif_default_put()
778 v = new & (IEC958_AES0_CON_EMPHASIS_5015|IEC958_AES0_CON_NOT_COPYRIGHT) ? 0 : AC97_CXR_COPYRGT; in snd_ac97_spdif_default_put()
786 0xff38, in snd_ac97_spdif_default_put()
787 ((val << 4) & 0xff00) | in snd_ac97_spdif_default_put()
788 ((val << 2) & 0x0038)); in snd_ac97_spdif_default_put()
791 snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */ in snd_ac97_spdif_default_put()
793 change |= snd_ac97_update_bits_nolock(ac97, AC97_SPDIF, 0x3fff, val); in snd_ac97_spdif_default_put()
806 int reg = kcontrol->private_value & 0xff; in snd_ac97_put_spsa()
807 int shift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_put_spsa()
808 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_put_spsa()
809 // int invert = (kcontrol->private_value >> 24) & 0xff; in snd_ac97_put_spsa()
813 value = (ucontrol->value.integer.value[0] & mask); in snd_ac97_put_spsa()
824 snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */ in snd_ac97_put_spsa()
856 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH),AC97_EXTENDED_STATUS, 2, 1, 0),
863 .private_value = AC97_SINGLE_VALUE(AC97_EXTENDED_STATUS, 4, 3, 0)
875 int mask = (kcontrol->private_value >> 16) & 0x0f; in snd_ac97_ad18xx_pcm_info_bits()
876 int lshift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_ad18xx_pcm_info_bits()
877 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_ad18xx_pcm_info_bits()
884 uinfo->value.integer.min = 0; in snd_ac97_ad18xx_pcm_info_bits()
886 return 0; in snd_ac97_ad18xx_pcm_info_bits()
893 int lshift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_ad18xx_pcm_get_bits()
894 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_ad18xx_pcm_get_bits()
895 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_ad18xx_pcm_get_bits()
897 ucontrol->value.integer.value[0] = mask - ((ac97->spec.ad18xx.pcmreg[codec] >> lshift) & mask); in snd_ac97_ad18xx_pcm_get_bits()
900 return 0; in snd_ac97_ad18xx_pcm_get_bits()
907 int lshift = (kcontrol->private_value >> 8) & 0x0f; in snd_ac97_ad18xx_pcm_put_bits()
908 int rshift = (kcontrol->private_value >> 12) & 0x0f; in snd_ac97_ad18xx_pcm_put_bits()
909 int mask = (kcontrol->private_value >> 16) & 0xff; in snd_ac97_ad18xx_pcm_put_bits()
912 val = (mask - (ucontrol->value.integer.value[0] & mask)) << lshift; in snd_ac97_ad18xx_pcm_put_bits()
930 uinfo->value.integer.min = 0; in snd_ac97_ad18xx_pcm_info_volume()
932 return 0; in snd_ac97_ad18xx_pcm_info_volume()
941 ucontrol->value.integer.value[0] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 8) & 31); in snd_ac97_ad18xx_pcm_get_volume()
942 ucontrol->value.integer.value[1] = 31 - ((ac97->spec.ad18xx.pcmreg[codec] >> 0) & 31); in snd_ac97_ad18xx_pcm_get_volume()
944 return 0; in snd_ac97_ad18xx_pcm_get_volume()
953 val1 = 31 - (ucontrol->value.integer.value[0] & 31); in snd_ac97_ad18xx_pcm_put_volume()
955 return snd_ac97_ad18xx_update_pcm_bits(ac97, codec, 0x1f1f, (val1 << 8) | val2); in snd_ac97_ad18xx_pcm_put_volume()
959 AD18XX_PCM_BITS("PCM Playback Switch", 0, 15, 7, 1),
960 AD18XX_PCM_VOLUME("PCM Playback Volume", 0)
975 AD18XX_PCM_BITS("LFE Playback Volume", 2, 0, 0, 31)
993 return 0; in snd_ac97_bus_free()
1015 return 0; in snd_ac97_free()
1030 return 0; in snd_ac97_try_volume_mix()
1034 return ac97->caps & AC97_BC_BASS_TREBLE ? 1 : 0; in snd_ac97_try_volume_mix()
1036 return ac97->caps & AC97_BC_HEADPHONE ? 1 : 0; in snd_ac97_try_volume_mix()
1038 return ac97->caps & AC97_BC_DEDICATED_MIC ? 1 : 0; in snd_ac97_try_volume_mix()
1043 return val == 0; in snd_ac97_try_volume_mix()
1045 return 0; in snd_ac97_try_volume_mix()
1047 if ((ac97->ext_id & AC97_EI_CDAC) == 0) in snd_ac97_try_volume_mix()
1048 return 0; in snd_ac97_try_volume_mix()
1051 if ((ac97->ext_id & AC97_EI_LDAC) == 0) in snd_ac97_try_volume_mix()
1052 return 0; in snd_ac97_try_volume_mix()
1054 mask = 0x0080; in snd_ac97_try_volume_mix()
1057 if ((ac97->ext_id & AC97_EI_SDAC) == 0) in snd_ac97_try_volume_mix()
1058 return 0; in snd_ac97_try_volume_mix()
1070 return 0; /* nothing here */ in snd_ac97_try_volume_mix()
1077 unsigned short cbit[3] = { 0x20, 0x10, 0x01 }; in check_volume_resolution()
1086 *lo_max = tbl->bits & 0xff; in check_volume_resolution()
1087 *hi_max = (tbl->bits >> 8) & 0xff; in check_volume_resolution()
1093 *lo_max = *hi_max = 0; in check_volume_resolution()
1094 for (i = 0 ; i < ARRAY_SIZE(cbit); i++) { in check_volume_resolution()
1106 if (! *lo_max && (val & 0x7f) == cbit[i]) in check_volume_resolution()
1108 if (! *hi_max && ((val >> 8) & 0x7f) == cbit[i]) in check_volume_resolution()
1134 val = AC97_MUTE_MASK_STEREO | (0x20 << shift); in snd_ac97_change_volume_params2()
1146 x &= 0xff; in printable()
1147 if (x < ' ' || x >= 0x71) { in printable()
1148 if (x <= 0x89) in printable()
1149 return x - 0x71 + 'A'; in printable()
1176 return 0; in snd_ac97_cmute_new_stereo()
1201 if (err < 0) in snd_ac97_cmute_new_stereo()
1205 return 0; in snd_ac97_cmute_new_stereo()
1211 static const DECLARE_TLV_DB_SCALE(db_scale_4bit, -4500, 300, 0);
1212 static const DECLARE_TLV_DB_SCALE(db_scale_5bit, -4650, 150, 0);
1213 static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -9450, 150, 0);
1214 static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
1215 static const DECLARE_TLV_DB_SCALE(db_scale_rec_gain, 0, 150, 0);
1220 case 0x0f: return db_scale_4bit; in find_db_scale()
1221 case 0x1f: return db_scale_5bit; in find_db_scale()
1222 case 0x3f: return db_scale_6bit; in find_db_scale()
1231 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in set_tlv_db_scale()
1244 return 0; in snd_ac97_cvol_new()
1247 struct snd_kcontrol_new tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1); in snd_ac97_cvol_new()
1252 struct snd_kcontrol_new tmp = AC97_SINGLE(name, reg, 0, lo_max, 1); in snd_ac97_cvol_new()
1263 if (err < 0) in snd_ac97_cvol_new()
1270 return 0; in snd_ac97_cvol_new()
1285 return 0; in snd_ac97_cmix_new_stereo()
1291 ac97)) < 0) in snd_ac97_cmix_new_stereo()
1297 if ((err = snd_ac97_cvol_new(card, name, reg, lo_max, hi_max, ac97)) < 0) in snd_ac97_cmix_new_stereo()
1300 return 0; in snd_ac97_cmix_new_stereo()
1304 snd_ac97_cmix_new_stereo(card, pfx, reg, 0, acheck, ac97)
1306 snd_ac97_cmute_new_stereo(card, name, reg, 0, acheck, ac97)
1323 AC97_MASTER, 0, ac97); in snd_ac97_mixer_build()
1326 AC97_MASTER, 0, ac97); in snd_ac97_mixer_build()
1327 if (err < 0) in snd_ac97_mixer_build()
1336 if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_center[0], ac97))) < 0) in snd_ac97_mixer_build()
1338 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_center[1], ac97))) < 0) in snd_ac97_mixer_build()
1340 snd_ac97_change_volume_params2(ac97, AC97_CENTER_LFE_MASTER, 0, &max); in snd_ac97_mixer_build()
1341 kctl->private_value &= ~(0xff << 16); in snd_ac97_mixer_build()
1350 if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_lfe[0], ac97))) < 0) in snd_ac97_mixer_build()
1352 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_lfe[1], ac97))) < 0) in snd_ac97_mixer_build()
1355 kctl->private_value &= ~(0xff << 16); in snd_ac97_mixer_build()
1364 /* Surround Master (0x38) is with stereo mutes */ in snd_ac97_mixer_build()
1366 AC97_SURROUND_MASTER, 1, 0, in snd_ac97_mixer_build()
1367 ac97)) < 0) in snd_ac97_mixer_build()
1374 AC97_HEADPHONE, 0, ac97)) < 0) in snd_ac97_mixer_build()
1381 AC97_MASTER_MONO, 0, ac97)) < 0) in snd_ac97_mixer_build()
1388 for (idx = 0; idx < 2; idx++) { in snd_ac97_mixer_build()
1389 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_tone[idx], ac97))) < 0) in snd_ac97_mixer_build()
1393 kctl->private_value &= ~(0xff << 16); in snd_ac97_mixer_build()
1397 snd_ac97_write_cache(ac97, AC97_MASTER_TONE, 0x0f0f); in snd_ac97_mixer_build()
1405 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1406 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_pc_beep[idx], ac97))) < 0) in snd_ac97_mixer_build()
1413 | AC97_MUTE_MASK_MONO | 0x001e) in snd_ac97_mixer_build()
1421 AC97_PHONE, 1, ac97)) < 0) in snd_ac97_mixer_build()
1430 AC97_MIC, 1, ac97)) < 0) in snd_ac97_mixer_build()
1432 if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic_boost, ac97))) < 0) in snd_ac97_mixer_build()
1440 AC97_LINE, 1, ac97)) < 0) in snd_ac97_mixer_build()
1448 AC97_CD, 1, ac97)) < 0) in snd_ac97_mixer_build()
1457 AC97_VIDEO, 1, ac97)) < 0) in snd_ac97_mixer_build()
1466 AC97_AUX, 1, ac97)) < 0) in snd_ac97_mixer_build()
1475 init_val = 0x9f9f; in snd_ac97_mixer_build()
1477 init_val = 0x9f1f; in snd_ac97_mixer_build()
1478 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1479 … if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97))) < 0) in snd_ac97_mixer_build()
1482 ac97->spec.ad18xx.pcmreg[0] = init_val; in snd_ac97_mixer_build()
1484 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1485 …(err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97))) < 0) in snd_ac97_mixer_build()
1491 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1492 … ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97))) < 0) in snd_ac97_mixer_build()
1495 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1496 … if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97))) < 0) in snd_ac97_mixer_build()
1507 AC97_PCM, 0, ac97); in snd_ac97_mixer_build()
1510 AC97_PCM, 0, ac97); in snd_ac97_mixer_build()
1511 if (err < 0) in snd_ac97_mixer_build()
1518 if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_control_capture_src, ac97))) < 0) in snd_ac97_mixer_build()
1522 AC97_REC_GAIN, 0, ac97); in snd_ac97_mixer_build()
1523 if (err < 0) in snd_ac97_mixer_build()
1526 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_control_capture_vol, ac97))) < 0) in snd_ac97_mixer_build()
1529 snd_ac97_write_cache(ac97, AC97_REC_SEL, 0x0000); in snd_ac97_mixer_build()
1530 snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x0000); in snd_ac97_mixer_build()
1534 for (idx = 0; idx < 2; idx++) in snd_ac97_mixer_build()
1535 …if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic_capture[idx], ac97))) < 0) in snd_ac97_mixer_build()
1538 snd_ac97_write_cache(ac97, AC97_REC_GAIN_MIC, 0x0000); in snd_ac97_mixer_build()
1543 …rr = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_PCM_OUT], ac97))) < 0) in snd_ac97_mixer_build()
1549 …l_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_STEREO_ENHANCEMENT], ac97))) < 0) in snd_ac97_mixer_build()
1555 …f ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_3D], ac97))) < 0) in snd_ac97_mixer_build()
1561 …r = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_LOUDNESS], ac97))) < 0) in snd_ac97_mixer_build()
1567 …((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_MONO], ac97))) < 0) in snd_ac97_mixer_build()
1573 … ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_MIC], ac97))) < 0) in snd_ac97_mixer_build()
1579 …r = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_general[AC97_GENERAL_LOOPBACK], ac97))) < 0) in snd_ac97_mixer_build()
1583 snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, ~AC97_GP_DRSS_MASK, 0x0000); in snd_ac97_mixer_build()
1591 val = 0x0707; in snd_ac97_mixer_build()
1594 val = val == 0x0606; in snd_ac97_mixer_build()
1595 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) in snd_ac97_mixer_build()
1599 if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[1], ac97))) < 0) in snd_ac97_mixer_build()
1603 snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000); in snd_ac97_mixer_build()
1610 if (ac97->subsystem_vendor == 0x1043 && in snd_ac97_mixer_build()
1611 ac97->subsystem_device == 0x810f) in snd_ac97_mixer_build()
1616 if ((err = ac97->build_ops->build_spdif(ac97)) < 0) in snd_ac97_mixer_build()
1619 for (idx = 0; idx < 5; idx++) in snd_ac97_mixer_build()
1620 if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_spdif[idx], ac97))) < 0) in snd_ac97_mixer_build()
1623 if ((err = ac97->build_ops->build_post_spdif(ac97)) < 0) in snd_ac97_mixer_build()
1628 snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20); in snd_ac97_mixer_build()
1636 if ((err = ac97->build_ops->build_specific(ac97)) < 0) in snd_ac97_mixer_build()
1645 if ((err = snd_ctl_add(card, kctl)) < 0) in snd_ac97_mixer_build()
1649 return 0; in snd_ac97_mixer_build()
1660 snd_ac97_write(ac97, AC97_GPIO_CFG, 0xffff & ~(AC97_GPIO_LINE1_OH)); in snd_ac97_modem_build()
1661 snd_ac97_write(ac97, AC97_GPIO_POLARITY, 0xffff & ~(AC97_GPIO_LINE1_OH)); in snd_ac97_modem_build()
1662 snd_ac97_write(ac97, AC97_GPIO_STICKY, 0xffff); in snd_ac97_modem_build()
1663 snd_ac97_write(ac97, AC97_GPIO_WAKEUP, 0x0); in snd_ac97_modem_build()
1664 snd_ac97_write(ac97, AC97_MISC_AFE, 0x0); in snd_ac97_modem_build()
1667 for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_modem_switches); idx++) in snd_ac97_modem_build()
1668 if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) in snd_ac97_modem_build()
1673 if ((err = ac97->build_ops->build_specific(ac97)) < 0) in snd_ac97_modem_build()
1676 return 0; in snd_ac97_modem_build()
1685 snd_ac97_write_cache(ac97, reg, tmp & 0xffff); in snd_ac97_test_rate()
1687 snd_ac97_write_cache(ac97, shadow_reg, tmp & 0xffff); in snd_ac97_test_rate()
1689 return val == (tmp & 0xffff); in snd_ac97_test_rate()
1694 unsigned int result = 0; in snd_ac97_determine_rates()
1708 AC97_EA_DRA, 0); in snd_ac97_determine_rates()
1742 AC97_EA_DRA, 0); in snd_ac97_determine_rates()
1754 unsigned int result = 0; in snd_ac97_determine_spdif_rates()
1763 for (i = 0; i < (int)ARRAY_SIZE(ctl_bits); i++) { in snd_ac97_determine_spdif_rates()
1787 sprintf(name, "0x%x %c%c%c", id, in snd_ac97_get_name()
1806 if (pid->mask != 0xffffffff) in snd_ac97_get_name()
1814 sprintf(name + strlen(name), " id %x", id & 0xff); in snd_ac97_get_name()
1836 * return 0 if ok, negative not ready
1853 if (val != 0xffff && (val & 1) != 0) in ac97_reset_wait()
1854 return 0; in ac97_reset_wait()
1859 if (val != 0 && val != 0xffff) in ac97_reset_wait()
1860 return 0; in ac97_reset_wait()
1866 snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a05); in ac97_reset_wait()
1867 if ((snd_ac97_read(ac97, AC97_REC_GAIN) & 0x7fff) == 0x0a05) in ac97_reset_wait()
1868 return 0; in ac97_reset_wait()
1919 if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops)) < 0) { in snd_ac97_bus()
1925 return 0; in snd_ac97_bus()
1947 if ((err = device_register(&ac97->dev)) < 0) { in snd_ac97_dev_register()
1953 return 0; in snd_ac97_dev_register()
1962 return 0; in snd_ac97_dev_disconnect()
2059 snd_ac97_write(ac97, AC97_RESET, 0); in snd_ac97_mixer()
2061 snd_ac97_write(ac97, AC97_EXTENDED_MID, 0); in snd_ac97_mixer()
2069 err = ac97_reset_wait(ac97, msecs_to_jiffies(500), 0); in snd_ac97_mixer()
2070 if (err < 0) in snd_ac97_mixer()
2074 if (err < 0) { in snd_ac97_mixer()
2084 (ac97->id == 0x00000000 || ac97->id == 0xffffffff)) { in snd_ac97_mixer()
2086 "AC'97 %d access is not valid [0x%x], removing mixer.\n", in snd_ac97_mixer()
2098 snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06); in snd_ac97_mixer()
2099 if (((err = snd_ac97_read(ac97, AC97_REC_GAIN)) & 0x7fff) == 0x0a06) in snd_ac97_mixer()
2105 if (ac97->ext_id == 0xffff) /* invalid combination */ in snd_ac97_mixer()
2106 ac97->ext_id = 0; in snd_ac97_mixer()
2112 if (ac97->ext_mid == 0xffff) /* invalid combination */ in snd_ac97_mixer()
2113 ac97->ext_mid = 0; in snd_ac97_mixer()
2133 snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0); in snd_ac97_mixer()
2135 snd_ac97_write_cache(ac97, AC97_RESET, 0); /* reset to defaults */ in snd_ac97_mixer()
2137 snd_ac97_write_cache(ac97, AC97_POWERDOWN, 0); in snd_ac97_mixer()
2140 snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0); in snd_ac97_mixer()
2143 if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f) in snd_ac97_mixer()
2170 snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0); in snd_ac97_mixer()
2173 snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0); in snd_ac97_mixer()
2181 "MC'97 %d converters and GPIO not ready (0x%x)\n", in snd_ac97_mixer()
2191 if (ac97->ext_id & 0x01c9) { /* L/R, MIC, SDAC, LDAC VRA support */ in snd_ac97_mixer()
2193 reg |= ac97->ext_id & 0x01c0; /* LDAC/SDAC/CDAC */ in snd_ac97_mixer()
2195 reg |= ac97->ext_id & 0x0009; /* VRA/VRM */ in snd_ac97_mixer()
2205 snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, AC97_GP_DRSS_MASK, 0); in snd_ac97_mixer()
2208 snd_ac97_determine_rates(ac97, AC97_PCM_FRONT_DAC_RATE, 0, &ac97->rates[AC97_RATES_FRONT_DAC]); in snd_ac97_mixer()
2209 snd_ac97_determine_rates(ac97, AC97_PCM_LR_ADC_RATE, 0, &ac97->rates[AC97_RATES_ADC]); in snd_ac97_mixer()
2221 snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, 0, &ac97->rates[AC97_RATES_MIC_ADC]); in snd_ac97_mixer()
2243 if (card->mixername[0] == '\0') { in snd_ac97_mixer()
2252 if ((err = snd_component_add(card, comp)) < 0) { in snd_ac97_mixer()
2256 if (snd_ac97_mixer_build(ac97) < 0) { in snd_ac97_mixer()
2263 if (card->mixername[0] == '\0') { in snd_ac97_mixer()
2272 if ((err = snd_component_add(card, comp)) < 0) { in snd_ac97_mixer()
2276 if (snd_ac97_modem_build(card, ac97) < 0) { in snd_ac97_mixer()
2284 if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ac97, &ops)) < 0) { in snd_ac97_mixer()
2289 return 0; in snd_ac97_mixer()
2306 snd_ac97_write(ac97, AC97_MASTER, 0x9f9f); in snd_ac97_powerdown()
2307 snd_ac97_write(ac97, AC97_HEADPHONE, 0x9f9f); in snd_ac97_powerdown()
2377 return 0; in snd_ac97_update_power()
2383 for (i = 0; i < PWIDX_SIZE; i++) { in snd_ac97_update_power()
2406 return 0; in snd_ac97_update_power()
2431 AC97_PD_PR3, 0); in update_power_regs()
2434 AC97_PD_PR2, 0); in update_power_regs()
2437 for (i = 0; i < PWIDX_SIZE; i++) { in update_power_regs()
2439 bits = 0; in update_power_regs()
2485 for (i = 2; i < 0x7c ; i += 2) { in snd_ac97_restore_status()
2507 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in snd_ac97_restore_iec958()
2537 snd_ac97_write(ac97, AC97_POWERDOWN, 0); in snd_ac97_resume()
2540 snd_ac97_write(ac97, AC97_RESET, 0); in snd_ac97_resume()
2542 snd_ac97_write(ac97, AC97_EXTENDED_MID, 0); in snd_ac97_resume()
2544 snd_ac97_write(ac97, AC97_POWERDOWN, 0); in snd_ac97_resume()
2546 snd_ac97_write(ac97, AC97_GENERAL_PURPOSE, 0); in snd_ac97_resume()
2550 ac97->bus->ops->write(ac97, AC97_MASTER, 0x8101); in snd_ac97_resume()
2553 if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101) in snd_ac97_resume()
2565 if (val != 0xffff && (val & 1) != 0) in snd_ac97_resume()
2603 memset(&id, 0, sizeof(id)); in snd_ac97_remove_ctl()
2612 memset(&sid, 0, sizeof(sid)); in ctl_find()
2625 return 0; in snd_ac97_rename_ctl()
2648 return 0; in snd_ac97_swap_ctl()
2658 if (err > 0) { in bind_hp_volsw_put()
2660 kcontrol->private_value = (kcontrol->private_value & ~0xff) | AC97_HEADPHONE; in bind_hp_volsw_put()
2678 return 0; in tune_hp_only()
2690 return 0; in tune_hp_only()
2701 return 0; in tune_swap_hp()
2710 return 0; in tune_swap_surround()
2717 if ((ac97->id & 0xffffff00) != 0x41445300) { in tune_ad_sharing()
2723 snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x0200); in tune_ad_sharing()
2724 return 0; in tune_ad_sharing()
2728 AC97_SINGLE("Jack Detect", AC97_ALC650_CLOCK, 5, 1, 0);
2733 if ((ac97->id & 0xffffff00) != 0x414c4700) { in tune_alc_jack()
2738 snd_ac97_update_bits(ac97, 0x7a, 0x20, 0x20); /* select jack detect function */ in tune_alc_jack()
2739 snd_ac97_update_bits(ac97, 0x7a, 0x01, 0x01); /* Line-out auto mute */ in tune_alc_jack()
2741 snd_ac97_update_bits(ac97, 0x74, 0x0800, 0x0800); in tune_alc_jack()
2752 return 0; in tune_inv_eapd()
2758 if (err > 0) { in master_mute_sw_put()
2760 int shift = (kcontrol->private_value >> 8) & 0x0f; in master_mute_sw_put()
2761 int rshift = (kcontrol->private_value >> 12) & 0x0f; in master_mute_sw_put()
2769 AC97_PD_EAPD : 0); in master_mute_sw_put()
2787 return 0; in tune_mute_led()
2794 if (err > 0) { in hp_master_mute_sw_put()
2796 int shift = (kcontrol->private_value >> 8) & 0x0f; in hp_master_mute_sw_put()
2797 int rshift = (kcontrol->private_value >> 12) & 0x0f; in hp_master_mute_sw_put()
2805 AC97_PD_EAPD : 0); in hp_master_mute_sw_put()
2825 return 0; in tune_hp_mute_led()
2848 if (type <= 0) in apply_quirk()
2849 return 0; in apply_quirk()
2854 return 0; in apply_quirk()
2863 for (i = 0; i < ARRAY_SIZE(applicable_quirks); i++) { in apply_quirk_str()
2869 if (*typestr >= '0' && *typestr <= '9') in apply_quirk_str()
2895 if (result < 0) in snd_ac97_tune_hardware()
2915 if (result < 0) in snd_ac97_tune_hardware()
2922 return 0; in snd_ac97_tune_hardware()