AC97: Add Winbond W83971D codec
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
#define AC97_CODEC_STAC9708 AC97_VENDOR_ID(0x83, 0x84, 0x76, 0x08)
|
||||
#define AC97_CODEC_STAC9721 AC97_VENDOR_ID(0x83, 0x84, 0x76, 0x09)
|
||||
#define AC97_CODEC_TR28023 AC97_VENDOR_ID('T', 'R', 'A', 0x03)
|
||||
#define AC97_CODEC_W83971D AC97_VENDOR_ID('W', 'E', 'C', 0x01)
|
||||
#define AC97_CODEC_WM9701A AC97_VENDOR_ID('W', 'M', 'L', 0x00)
|
||||
|
||||
typedef struct ac97_vendor_reg_t {
|
||||
@@ -150,6 +151,7 @@ extern const device_t cs4297a_device;
|
||||
extern const device_t stac9708_device;
|
||||
extern const device_t stac9721_device;
|
||||
extern const device_t tr28023_device;
|
||||
extern const device_t w83971d_device;
|
||||
extern const device_t wm9701a_device;
|
||||
|
||||
extern const device_t ac97_via_device;
|
||||
|
||||
@@ -104,6 +104,12 @@ static const struct {
|
||||
.extid_flags = 0,
|
||||
.pcsr_mask = 0x3f
|
||||
},
|
||||
{
|
||||
.device = &w83971d_device,
|
||||
.misc_flags = AC97_MASTER_6B | AC97_MONOOUT | AC97_MONOOUT_6B | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
|
||||
.reset_flags = (27 << AC97_3D_SHIFT),
|
||||
.pcsr_mask = 0x3f
|
||||
},
|
||||
{
|
||||
.device = &wm9701a_device,
|
||||
.misc_flags = AC97_AUXOUT | AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
|
||||
@@ -284,8 +290,9 @@ line_gain:
|
||||
|
||||
case 0x22: /* 3D Control */
|
||||
switch (ac97_codecs[dev->model].reset_flags >> AC97_3D_SHIFT) {
|
||||
case 1: /* Analog Devices */
|
||||
case 6: /* Crystal */
|
||||
case 1: /* Analog Devices */
|
||||
case 6: /* Crystal */
|
||||
case 27: /* Winbond */
|
||||
val &= 0x000f;
|
||||
break;
|
||||
|
||||
@@ -764,6 +771,20 @@ const device_t tr28023_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t w83971d_device = {
|
||||
.name = "Winbond W83971D",
|
||||
.internal_name = "w83971d",
|
||||
.flags = DEVICE_AC97,
|
||||
.local = AC97_CODEC_W83971D,
|
||||
.init = ac97_codec_init,
|
||||
.close = ac97_codec_close,
|
||||
.reset = ac97_codec_reset,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t wm9701a_device = {
|
||||
.name = "Wolfson WM9701A",
|
||||
.internal_name = "wm9701a",
|
||||
|
||||
Reference in New Issue
Block a user