Add speaker/headphone controls for HP Compaq DC7700 Small Form Factor PC

@ ALC262.

Submitted by:	Carlos A. M. dos Santos <unixmania at gmail dot com>
This commit is contained in:
Ariff Abdullah 2007-12-13 15:48:45 +00:00
parent c8d361d42d
commit d155e640d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174579

View File

@ -179,6 +179,7 @@ SND_DECLARE_FILE("$FreeBSD$");
#define HP_XW4300_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3013)
#define HP_3010_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3010)
#define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5)
#define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801)
#define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802)
#define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff)
/* What is wrong with XN 2563 anyway? (Got the picture ?) */
@ -4304,7 +4305,18 @@ hdac_vendor_patch_parse(struct hdac_devinfo *devinfo)
}
break;
case HDA_CODEC_ALC262:
if (subvendor == HP_DC7700_SUBVENDOR) {
if (subvendor == HP_DC7700S_SUBVENDOR) {
ctl = hdac_audio_ctl_amp_get(devinfo, 21, 0, 1);
if (ctl != NULL && ctl->widget != NULL) {
ctl->ossmask = SOUND_MASK_PHONEOUT;
ctl->widget->ctlflags |= SOUND_MASK_PHONEOUT;
}
ctl = hdac_audio_ctl_amp_get(devinfo, 22, 0, 1);
if (ctl != NULL && ctl->widget != NULL) {
ctl->ossmask = SOUND_MASK_SPEAKER;
ctl->widget->ctlflags |= SOUND_MASK_SPEAKER;
}
} else if (subvendor == HP_DC7700_SUBVENDOR) {
ctl = hdac_audio_ctl_amp_get(devinfo, 22, 0, 1);
if (ctl != NULL && ctl->widget != NULL) {
ctl->ossmask = SOUND_MASK_SPEAKER;