Date: Thu, 13 Dec 2007 10:03:19 -0200 From: "Carlos A. M. dos Santos" <unixmania@gmail.com> To: freebsd-multimedia@FreeBSD.org Subject: snd_hda on HP DC7700 SFF Message-ID: <e71790db0712130403w31ec85akaca095cdff89286a@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, I have a HP Compaq dc7700 Small Form Factor PC, as described here: http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/12454-12454-64287-321860-3328898-3232029.html?jumpid=oc_R1002_USENC-001_HP%20Compaq%20dc7700%20Small%20Form%20Factor%20PC&lang=en&cc=us (sorry for the lengthy URL) The subvendor ID of this machine is 0x2801, not 0x2802 as expected by the code in hdac.c. Also, sound usually is sento to the internal speaker, as long as the phone and line outputs. I was able to make it work better using the attached patch. Perhaps there is a more elegant way to do this, so I'd like do hear some opinions before submitting a PR. I can run other tests on my machine, if necessary. Please answer directly to me because I don't subscribe the list. -- Carlos A. M. dos Santos [-- Attachment #2 --] --- hdac.c.orig 2007-11-30 13:11:13.000000000 -0200 +++ hdac.c 2007-12-12 19:53:21.000000000 -0200 @@ -179,6 +179,7 @@ #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 ?) */ @@ -4289,7 +4290,18 @@ } 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e71790db0712130403w31ec85akaca095cdff89286a>
