patch from Hüseyin Erdemir: his laptops HP nx8220 didn't have Headphone Jacksense working as is. Thanks!
Some other HP laptops have this problem. Maybe we should have ac97 export quirks and the driver uses them. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22284 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef09f96409
commit
8d93a4beb1
@ -95,12 +95,14 @@ typedef struct codec_table_tag
|
||||
|
||||
void default_init(device_config *);
|
||||
void ad1886_init(device_config *);
|
||||
void ad1981b_init(device_config *);
|
||||
|
||||
void default_amp_enable(device_config *, bool);
|
||||
void cs4299_amp_enable(device_config *, bool);
|
||||
|
||||
codec_ops default_ops = { default_init, default_amp_enable };
|
||||
codec_ops ad1886_ops = { ad1886_init, default_amp_enable };
|
||||
codec_ops ad1981b_ops = { ad1981b_init, default_amp_enable };
|
||||
codec_ops cs4299_ops = { default_init, cs4299_amp_enable };
|
||||
|
||||
codec_table codecs[] =
|
||||
@ -150,6 +152,7 @@ codec_table codecs[] =
|
||||
{ 0x41445363, 0xffffffff, &default_ops, "Analog Devices AD1886A SoundMAX"B_UTF8_REGISTERED },
|
||||
{ 0x41445371, 0xffffffff, &default_ops, "Analog Devices AD1981A SoundMAX"B_UTF8_REGISTERED },
|
||||
{ 0x41445372, 0xffffffff, &default_ops, "Analog Devices AD1981A SoundMAX"B_UTF8_REGISTERED },
|
||||
{ 0x41445374, 0xffffffff, &ad1981b_ops, "Analog Devices AD1981B SoundMAX"B_UTF8_REGISTERED },
|
||||
{ 0x414c4320, 0xfffffff0, &default_ops, "Avance Logic (Realtek) ALC100/ALC100P, RL5383/RL5522" },
|
||||
{ 0x414c4730, 0xffffffff, &default_ops, "Avance Logic (Realtek) ALC101" },
|
||||
#if 0
|
||||
@ -251,7 +254,18 @@ void default_init(device_config *config)
|
||||
void ad1886_init(device_config *config)
|
||||
{
|
||||
LOG(("ad1886_init\n"));
|
||||
auich_codec_write(config, 0x72, 0x0010);
|
||||
auich_codec_write(config, AC97_AD_JACKSENSE, 0x0010);
|
||||
}
|
||||
|
||||
void ad1981b_init(device_config *config)
|
||||
{
|
||||
uint32 id;
|
||||
LOG(("ad1981b_init\n"));
|
||||
id = (config->subvendor_id << 16) | config->subsystem_id;
|
||||
if (id == 0x103c0934) {
|
||||
auich_codec_write(config, AC97_AD_JACKSENSE,
|
||||
auich_codec_read(config, AC97_AD_JACKSENSE) | 0x0800);
|
||||
}
|
||||
}
|
||||
|
||||
void default_amp_enable(device_config *config, bool yesno)
|
||||
|
@ -64,6 +64,7 @@ enum AC97_REGISTER {
|
||||
AC97_CENTER_LFE_VOLUME = 0x36,
|
||||
AC97_SURROUND_VOLUME = 0x38,
|
||||
AC97_SPDIF_CONTROL = 0x3A,
|
||||
AC97_AD_JACKSENSE = 0x72,
|
||||
AC97_VENDOR_ID1 = 0x7C,
|
||||
AC97_VENDOR_ID2 = 0x7E
|
||||
};
|
||||
|
@ -607,6 +607,8 @@ auich_setup(auich_dev * card)
|
||||
|
||||
make_device_names(card);
|
||||
|
||||
card->config.subvendor_id = card->info.u.h0.subsystem_vendor_id;
|
||||
card->config.subsystem_id = card->info.u.h0.subsystem_id;
|
||||
card->config.nabmbar = card->info.u.h0.base_registers[0];
|
||||
card->config.irq = card->info.u.h0.interrupt_line;
|
||||
card->config.type = 0;
|
||||
|
@ -46,6 +46,9 @@ typedef struct
|
||||
void * log_mbbar; // ich4
|
||||
area_id area_mmbar; // ich4
|
||||
area_id area_mbbar; // ich4
|
||||
|
||||
ushort subvendor_id;
|
||||
ushort subsystem_id;
|
||||
} device_config;
|
||||
|
||||
#define TYPE_ICH4 0x01
|
||||
|
Loading…
Reference in New Issue
Block a user