Lines 44-52
Link Here
|
44 |
|
44 |
|
45 |
void ad198x_patch(struct ac97_info* codec) |
45 |
void ad198x_patch(struct ac97_info* codec) |
46 |
{ |
46 |
{ |
|
|
47 |
/* |
48 |
* AD198x series have 2 pairs of analog output: |
49 |
* SURR_OUT/HP_OUT(surround or headphone) and LINE_OUT. |
50 |
* |
51 |
* Since SURR_OUT/HP_OUT output pins are equipped with power amps, |
52 |
* retail machines often wire these to headphones jacks and/or |
53 |
* internal speakers. |
54 |
* This also means "mixer phout" will adjust speaker volume |
55 |
* and "mixer vol" adjust lineout level, _independently_. |
56 |
* |
57 |
* (Linux has flags to swap vol/phout, and FreeBSD can do similar |
58 |
* by mix_setrealdev() and gang them with mix_setparentchild()) |
59 |
* |
60 |
* AD198x register 0x76 |
61 |
* 0x0400: select mixer for SURR_OUT/HP_OUT output pins (default surround DAC) |
62 |
* 0x0020: select surround DAC for LINE_OUT output pins (default mixer) |
63 |
* |
64 |
* Selecting surround DAC for any output will yield "no sound", |
65 |
* until FreeBSD supports surround DAC handling. |
66 |
* |
67 |
* Previous ad198x_patch() had set 0x0420, but 0x0400 seems to be |
68 |
* better for all instances. At least you have mixer output |
69 |
* for all output pins. |
70 |
* The value is valid for all AD1888, AD1980, AD1985 and AD1986. |
71 |
* (AD1986, having independent SURR_OUT and HP_OUT, will select |
72 |
* mixer output for SURR_OUT by setting 0x0400 bit.) |
73 |
* |
74 |
* Fujitsu C610 seems to wire SURR_OUT/HP_OUT for |
75 |
* internal speaker, and LINE_OUT for lineout AND headphone jacks; |
76 |
* by setting previous 0x0420, internal speaker works but |
77 |
* no output for either jacks. |
78 |
* ASUS A9T may had been working by not setting the register because |
79 |
* it only wired LINE_OUT. |
80 |
*/ |
47 |
switch (ac97_getsubvendor(codec)) { |
81 |
switch (ac97_getsubvendor(codec)) { |
48 |
case 0x11931043: /* Not for ASUS A9T (probably else too). */ |
82 |
case 0x11931043: /* Not for ASUS A9T (probably else too). */ |
49 |
break; |
83 |
break; |
|
|
84 |
case 0x122f10cf: /* Fujitsu C610 (perhaps for others) */ |
85 |
ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0400); |
86 |
break; |
50 |
default: |
87 |
default: |
51 |
ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0420); |
88 |
ac97_wrcd(codec, 0x76, ac97_rdcd(codec, 0x76) | 0x0420); |
52 |
break; |
89 |
break; |