Commit Graph

64 Commits

Author SHA1 Message Date
kent
8e74ad23a5 make sure of readiness of an AC'97 codec by writing a value and
reading it.  There is a codec which is not operational just
after power states become ready.

PR#26457
2004-10-17 08:20:15 +00:00
kent
44f6147e9d split outputs.tone to outputs.bass and outputs.treble
from OpenBSD
2004-10-12 14:34:41 +00:00
kent
54cf6460d6 ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case.

PR: kern/26973
2004-09-22 12:20:24 +00:00
kent
4f9d67091a add debug code for ac97_write().
It is enabled by defining AC97_IO_DEBUG.
2004-08-28 07:02:11 +00:00
thorpej
8b2ffcedfc Use ANSI function decls and more use of static. 2004-08-24 00:53:28 +00:00
kent
2edd85fb18 Check power states after codec reset. This change fixes a
resume problem on some boards.
Patch provided by Joachim Thiemann in PR kern/26457
2004-08-20 14:36:13 +00:00
kent
c525acb34a VT1616i support 2004-08-08 10:41:57 +00:00
kent
824fd59f6d correct the mask value for CMI9739 2004-08-08 03:52:19 +00:00
kent
6f7bcb397d recognize CMI9739 codec. 2004-08-08 03:50:56 +00:00
kent
9e25bf4c82 AD1888 support.
PR kern/25949
2004-08-07 17:37:31 +00:00
kent
1c7464b5ca recognize ALC655/658/850 2004-08-07 16:59:54 +00:00
mrg
a596504c46 - update URLs for sigmatel.
- add entry for "SigmaTel STAC9758/59" (seen on a new emuxki card)
2004-06-01 13:35:59 +00:00
kent
f2680f731e An ICH board needs reading AC97_REG_RESET before reading AC97_VENDOR_ID.
(why?)
http://mail-index.netbsd.org/current-users/2003/11/22/0007.html
2003-11-24 16:05:10 +00:00
kent
c51ed264ee AD1985 codec needs the same quirk as AD1980.
The patch was provided by Lars Heidieker.
2003-11-22 06:15:29 +00:00
kent
c6585e1d6d Cosmetic changes
- ANSIfy
 - no argument names in prototypes
 - variable declaration with initialization
2003-11-22 05:40:48 +00:00
cube
e57b040603 Change the way of setting a port value so that a change too small to
fit in the number of bits used for the port still does something.

This fixes PR pkg/18741 for ac97-based hardware. Other audio drivers
might need a similar fix.
2003-09-28 22:24:09 +00:00
kent
1bea39944d codec id for AD1985 2003-09-28 15:39:09 +00:00
jmmv
16091f0f1c After initialization of the AD1980 codec, swap master and surround volume
controls.  As it was before, the master volume control in all mixer programs
did nothing.  It seems that this codec is not correctly wired in (almost?)
all motherboards.

Patch by Quentin Garnier.  Fixes first part of PR kern/22548.
2003-09-11 09:21:29 +00:00
kent
941d061f07 Correct flag names of AD1980 2003-09-08 13:58:21 +00:00
kent
d10ee65a85 Codec id ADS 0x70 is AD1980, not AD1981.
http://mail-index.netbsd.org/tech-kern/2003/09/03/0005.html
2003-09-07 11:59:39 +00:00
kent
98f4ce5fd6 Use bitmask_snprintf() for printing ext id features. 2003-09-07 11:27:32 +00:00
kent
f7f6440dff Add AD1981-specific initialization.
The patch provided by Lars Heideker.

PR: kern/20368
2003-06-13 05:31:29 +00:00
scw
146abc03d1 In ac97_restore_shadow(), make sure to restore the codec's extended
control register if we configured it during ac97_attach().
2003-06-11 14:22:27 +00:00
bsh
cf662c7814 add Philips UCB1400 2003-03-03 02:14:12 +00:00
thorpej
749715f6ee Use aprint_*(). 2003-01-31 00:26:25 +00:00
simonb
bbd9776970 Remove variable that is only assigned too but not referenced. 2003-01-20 07:20:01 +00:00
matt
a5201ab8fc Recognize AD1981 codec (0x41445370). XXX name is a guess but it follows
the existing pattern.
2002-12-26 20:56:52 +00:00
kent
12ac4ab865 Fix LR contrary problem of mixer and record gain polarity
problem.  The change is based on the patches in PR kern/12878 by
Zdenek Salvet and PR kern/18901 by SUNAKAWA Hirokatsu.
2002-11-06 16:58:37 +00:00
kent
dbf1b9ea9f Add codec IDs for AD1981B, STAC9750/51, and STAC9766/67.
Whitespace.
2002-11-06 13:41:22 +00:00
kent
742633f2d2 Correct codec id of VT1611A.
Add codec id of VT1616.

ALC650 codec specific chagne:
 Add outputs.surround.mixtofront,
 outputs.center.mixtofront, and outputs.lfe.mixtofront.

VT1616 codec specific change:
 Add outputs.surround.mixtofront,
 outputs.center.mixtofront, and outputs.lfe.mixtofront.
 (Not tested)

XXX: We should provide ac97(4) manual page and describe
codec-specific features.
2002-10-22 13:48:30 +00:00
kent
56d5eaf4f4 Add all vendor/codec IDs which OpenBSD has and NetBSD doesn't have. 2002-10-16 16:38:25 +00:00
kent
297e3c5d35 Mixer changes:
- Add "outputs.surround", "outputs.center", and "outputs.lfe"
 - If the codec is not capable of a feature, mixer variables
about the feature is not created.  For example, no
"outputs.tone" for a codec without tone control.
 - Set the following mixer values in ac97_attach():
	outputs.master=127,127
	outputs.master.mute=off
	outputs.headphones.mute=off
	outputs.surround=127,127
	outputs.surround.mute=off
	outputs.center=127
	outputs.center.mute=off
	outputs.lfe=127
	outputs.lfe.mute=off
	inputs.dac.mute=off
	inputs.cd.mute=off
	inputs.line.mute=off
	inputs.aux.mute=off
	inputs.video.mute=off
	record.volume.mute=off
    because the default setting of AC'97 codec (all mutes are on,
    and maximum volume) is troublesome.
 - Make "char*" parameters of ac97_get_portnum_by_name() "const char*"

Codec ID changes:
 - If a codec ID is unknown but its vendor ID is known,
ac97_attach() prints the vendor name like "dev0: <vendor name>
unknown (0xXXXXXXXX) codec;"
 - Add IDs of Asahi Kasei AK4542, AK4544, AK4544A, AK4545,
Realtek ALC100
 - Correct a vendor name: "Advance Logic" -> "Avance Logic"
 - Add capability of codec-specific initialization

ac97_attach():
 - CDAC, SDAC, and LDAC are eanabled.
 - DELAY() before mixer settings.  ThinkPad X24 needs it.

ALC650 codec specific change:
 - Add "outputs.surround.lineinjack" to switch the line-in jack
to the surround output
 - Add "outputs.center.micjack" and "outputs.lfe.micjack" (alias
of "outputs.center.micjack") to switch the mic jack to the
center/lfe output.
2002-10-14 08:48:15 +00:00
kent
42e4e19119 ac97_attach(): Restore the default rate value after VRA checking.
This change might solve PR kern/18613.
2002-10-11 02:32:23 +00:00
kent
dd7455ebdc Add 'mask' member to the struct ac97_codecid.
Cirrus Logic Crystal codec uses lower three bits in ID for a
revision number.  We should mask an actual ID value before
matching to this table.
2002-10-09 12:06:17 +00:00
pooka
48f6d7e229 fill in name for TriTech unknown: TR28602 2002-10-08 21:40:04 +00:00
kent
3decf6fda3 If the codec is fixed-rate, ac97_set_rate() returns 48kHz. 2002-10-08 12:33:34 +00:00
kent
20040ef785 Add IDs for YMF743-S and YMF753-S.
ac97_attach(): Enable VRA/VRM if the codec is capable of them.

The struct ac97_softc keeps the clock of the codec, the basic
features flag (the value of AC97_REG_RESET), and the extended
features flag (the value of AC97_REG_EXT_AUDIO_ID).

ac97_codec_if: Add get_extcaps(), set_rate(), and set_clock()
methods.
2002-10-08 09:19:44 +00:00
kent
f06ae93219 Add some constant symbols for AC97 registers and values based on OpenBSD.
Rename some symbols to sync with OpenBSD:
	AC97_REG_EXTENDED_ID
	-> AC97_REG_EXT_AUDIO_ID
	AC97_REG_EXTENDED_STATUS
	-> AC97_REG_EXT_AUDIO_CTRL
	AC97_CODEC_DOES_VRA/AC97_ENAB_VRA
	-> AC97_EXT_AUDIO_VRA
	AC97_CODEC_DOES_MICVRA/AC97_ENAB_MICVRA
	-> AC97_EXT_AUDIO_VRM

ac97feature: "mic channel" -> "dedicated mic channel"
ac97_attach(): print extended capabilities; VRA, DRA, SPDIF, VRM, CDAC,
SDAC, LDAC.
2002-10-06 16:33:35 +00:00
joda
65e92349c7 more device names 2002-10-04 19:22:40 +00:00
joda
d1acc508df add a couple of Analog device names 2002-07-05 13:50:47 +00:00
ichiro
ed09e8d901 It corrected forgetting to attach "," 2002-01-23 14:50:45 +00:00
tsutsui
84926576f1 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:03:11 +00:00
jmcneill
4e14c9fb3f For cosmetic reasons, add 'ESS Technology ES1921' to the table of codec Ids. 2002-01-06 17:03:17 +00:00
lukem
a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
thorpej
7a4838199c bcopy -> memcpy 2001-07-07 15:56:07 +00:00
erh
acc17cc823 Set the delta for the particular source so telling mixerctl to decrease the
volume (using --) adjusts it far enough to stick.
2001-04-29 02:47:25 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
rh
cb2d30303b Add new AC97_HOST_SWAPPED_CHANNELS host flag that causes left and right
mixer channels to be swapped (required for hardware that has wiring
reversed).
2001-01-09 23:14:25 +00:00
augustss
cc9f003455 Add some codecs. 2001-01-05 03:32:11 +00:00
thorpej
aac73109ae Feh, fix st00p1d braino in last. 2000-11-05 05:41:25 +00:00