From nobody Thu Mar 24 13:55:06 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 73F981A23BB0; Thu, 24 Mar 2022 13:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KPRYk2KZ0z3mWH; Thu, 24 Mar 2022 13:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648130106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJcJxtpB4We0YDkYih7Uz4APnTPVnucU3WpRm2X7z1A=; b=c2gRNy0jXDuEKLW+XEVVAbHJDbGFttJn06r77o5YSyjg0obOKl7O1svrFD8glFFM/MNayA mJxB/FdRq1Y7DaoEOnQCBVM2hdksDhRE8hJ/HfDEAHEwU5L2mCJz6goIrPJznGVAw/XhpK q5SV0r1j+CUWJ1m1PKrvbnjPUl56X91kdxhSpr2zYZx35UjrgKEjd7SjMHgaPuzuJN2nDB uwGoxQDsA3VjbZkghWNlUZFZLvCqUNnIyvYhrhVO4v3pVETxl2imC0CSz85+No+a45vrZ2 NZl38E6OC9uliP4aAvj+JmtukxS4aky5G/P9qzQHze9Fvo6YrKoAQakuZygU4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E48318EFE; Thu, 24 Mar 2022 13:55:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22ODt6cd086390; Thu, 24 Mar 2022 13:55:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22ODt6rE086389; Thu, 24 Mar 2022 13:55:06 GMT (envelope-from git) Date: Thu, 24 Mar 2022 13:55:06 GMT Message-Id: <202203241355.22ODt6rE086389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6228b19e0ef0 - stable/13 - hdaa: update pin patch configurations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6228b19e0ef089077c650ca343197d8be7d2a587 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648130106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJcJxtpB4We0YDkYih7Uz4APnTPVnucU3WpRm2X7z1A=; b=gQa3TMmGfe/5DLC6/bqXAqYR25LwA+IR0DC3VXpL7fnfiPiopI88/3NxqMAejBEDv7x64G 8WpOFkYMCfI/BpN9yhnszVW8I1ohIxi9aOl6m2hdW2/AtUEpXQq4OfG3aF96/WH+cYTCap h8M5sf002SmklwoxLqKjhY4CGvJ6mMdGtVnPRJjDy1aNNKtD0QsAhdPkeWevXZdwOuO9rm LIiM7N3wFkZmcb1ja6Bcp4r8vOFhXElH+SoUdPkPGk/si6KD88z0KW1Clj9/DTlMxwZH8y rTUuGV/N0EOgWhwgC+ddSRvJwAETWBKjphSWparmXKIUjLgPVShAArgbXOlBqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648130106; a=rsa-sha256; cv=none; b=HOxPEXrsBa4oUT8f3Ke37f6NaWe6vCfu1nZSGh8B4+XAskKHby5lwu6RJikd+SdLTPtyCq M8nUqC18e9M9cMcueI0df5hP3R05IxOHW9+p8yTjJqrTeHgSK4y63zKLqBSXFK65TytDGv ydJ23bshksEZW+/+ywMJN3t4AZZQd3dmCP01tSBI6xPveEGrg53LpjIggPohJjbFoZm0QC mGSuarKqQoQ7qsGqA1VwwevGfKwUeyUNl0lhK7RHyd4J+QVOjlxhAL2r1MFxIjzCb+w4/I AkNQuCe52FLAV3fELIZ90McmEyBxY37ax33Jyg4Ysbg3rqEpqk+28us+lUMreQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6228b19e0ef089077c650ca343197d8be7d2a587 commit 6228b19e0ef089077c650ca343197d8be7d2a587 Author: K Staring AuthorDate: 2021-07-03 06:15:49 +0000 Commit: Ed Maste CommitDate: 2022-03-24 13:52:37 +0000 hdaa: update pin patch configurations A number of structural changes: - Use decimal nid numbers instead of hex - updated the branch to incoorporate the suggestions made in the ALC280 pull request github thread - Convert magic pin values into strings. - Also update hdaa_patches to use clearer enums.. - made pin patch type enum clearer, add macro for 'string' type patches - Added pin_patch structures to separate data from logic. - Integrated Realtek patches into new structure. These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, ALC2880 And have definitions for a number of Dell and HP laptops. Much of this data has been mined fromt he tables in the Linux driver. imp squashed these into one commit because the changes from the github pull requests no longer cleanly apply individually and made light style changes after feedback from jhb. Pull Request: https://github.com/freebsd/freebsd-src/pull/139 Pull Request: https://github.com/freebsd/freebsd-src/pull/140 Pull Request: https://github.com/freebsd/freebsd-src/pull/141 Pull Request: https://github.com/freebsd/freebsd-src/pull/142 Pull Request: https://github.com/freebsd/freebsd-src/pull/143 Pull Request: https://github.com/freebsd/freebsd-src/pull/144 Pull Request: https://github.com/freebsd/freebsd-src/pull/145 Pull Request: https://github.com/freebsd/freebsd-src/pull/146 Pull Request: https://github.com/freebsd/freebsd-src/pull/147 Pull Request: https://github.com/freebsd/freebsd-src/pull/148 Pull Request: https://github.com/freebsd/freebsd-src/pull/149 Pull Request: https://github.com/freebsd/freebsd-src/pull/150 Differential Revision: https://reviews.freebsd.org/D30619 (cherry picked from commit ef790cc7407e827db9563d08a52a71ab36436986) (cherry picked from commit 29b4fa787621cbfb070323ecf2ea2da4d372bd94) (cherry picked from commit a10c85e0f90c8739863f670d490b35d38a37648f) (cherry picked from commit 86d69de88d1c7e8c7ed906590652008fc6f44d05) --- sys/dev/sound/pci/hda/hda_reg.h | 26 +- sys/dev/sound/pci/hda/hdaa.c | 50 +- sys/dev/sound/pci/hda/hdaa.h | 4 +- sys/dev/sound/pci/hda/hdaa_patches.c | 260 +++----- sys/dev/sound/pci/hda/hdac.c | 8 +- sys/dev/sound/pci/hda/hdac.h | 147 ++++- sys/dev/sound/pci/hda/hdacc.c | 14 +- sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 ++++++++++++++++++++++++++++++ 9 files changed, 1380 insertions(+), 242 deletions(-) diff --git a/sys/dev/sound/pci/hda/hda_reg.h b/sys/dev/sound/pci/hda/hda_reg.h index 91099caf083d..59fe92dd6d7e 100644 --- a/sys/dev/sound/pci/hda/hda_reg.h +++ b/sys/dev/sound/pci/hda/hda_reg.h @@ -668,7 +668,7 @@ /* Channel Count Control */ #define HDA_CMD_VERB_GET_CONV_CHAN_COUNT 0xf2d -#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d +#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d #define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ @@ -677,20 +677,20 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload))) -#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e +#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e #define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg))) -#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f +#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f #define HDA_CMD_GET_HDMI_ELDD(cad, nid, off) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_GET_HDMI_ELDD, (off))) -#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 -#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 +#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 +#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 #define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ @@ -699,8 +699,8 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload))) -#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 -#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 +#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 +#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 #define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ @@ -709,8 +709,8 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload))) -#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 -#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 +#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 +#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 #define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ @@ -719,11 +719,11 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload))) -#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 -#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 +#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 +#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 -#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34 -#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734 +#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34 +#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734 #define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 4d872dc88405..0b5bb4fdf3bf 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -2712,7 +2712,7 @@ hdaa_audio_ctl_recsel_comm(struct hdaa_pcm_devinfo *pdevinfo, uint32_t src, nid_ if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER) { ctl = hdaa_audio_ctl_amp_get(devinfo, w->nid, HDAA_CTL_IN, i, 1); - if (ctl == NULL) + if (ctl == NULL) continue; /* If we have input control on this node mute them * according to requested sources. */ @@ -3080,7 +3080,7 @@ hdaa_audio_ctl_parse(struct hdaa_devinfo *devinfo) if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX || w->waspin) ctls[cnt].ndir = HDAA_CTL_IN; - else + else ctls[cnt].ndir = HDAA_CTL_OUT; ctls[cnt++].dir = HDAA_CTL_OUT; } @@ -3145,7 +3145,7 @@ hdaa_audio_ctl_parse(struct hdaa_devinfo *devinfo) if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) ctls[cnt].ndir = HDAA_CTL_OUT; - else + else ctls[cnt].ndir = HDAA_CTL_IN; ctls[cnt++].dir = HDAA_CTL_IN; break; @@ -4138,7 +4138,7 @@ hdaa_audio_disable_nonaudio(struct hdaa_devinfo *devinfo) w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET) { w->enable = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling nid %d due to it's" " non-audio type.\n", w->nid); @@ -4165,7 +4165,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) { w->enable = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling pin nid %d due" " to None connectivity.\n", w->nid); @@ -4174,7 +4174,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) == 0) { w->enable = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling unassociated" " pin nid %d.\n", w->nid); @@ -4201,7 +4201,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) ctl->widget->connsenable[ctl->index] = 0; done = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling ctl %d nid %d cnid %d due" " to disabled widget.\n", i, ctl->widget->nid, @@ -4222,7 +4222,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) if (cw == NULL || cw->enable == 0) { w->connsenable[j] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling nid %d connection %d due" " to disabled child widget.\n", i, j); @@ -4245,7 +4245,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) w->enable = 0; done = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling nid %d due to all it's" " inputs disabled.\n", w->nid); ); @@ -4270,7 +4270,7 @@ hdaa_audio_disable_useless(struct hdaa_devinfo *devinfo) w->enable = 0; done = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling nid %d due to all it's" " consumers disabled.\n", w->nid); ); @@ -4296,7 +4296,7 @@ hdaa_audio_disable_unas(struct hdaa_devinfo *devinfo) if (w->bindas == -1) { w->enable = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling unassociated nid %d.\n", w->nid); ); @@ -4318,7 +4318,7 @@ hdaa_audio_disable_unas(struct hdaa_devinfo *devinfo) continue; w->connsenable[j] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling connection to input pin " "nid %d conn %d.\n", i, j); @@ -4351,7 +4351,7 @@ hdaa_audio_disable_unas(struct hdaa_devinfo *devinfo) if (cw->connsenable[j] && cw->conns[j] == i) { cw->connsenable[j] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling connection from output pin " "nid %d conn %d cnid %d.\n", k, j, i); @@ -4400,7 +4400,7 @@ hdaa_audio_disable_notselected(struct hdaa_devinfo *devinfo) continue; w->connsenable[j] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling unselected connection " "nid %d conn %d.\n", i, j); @@ -4455,7 +4455,7 @@ hdaa_audio_disable_crossas(struct hdaa_devinfo *devinfo) continue; w->connsenable[j] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling crossassociatement connection " "nid %d conn %d cnid %d.\n", i, j, cw->nid); @@ -4497,7 +4497,7 @@ hdaa_audio_disable_crossas(struct hdaa_devinfo *devinfo) if (ctl->ndir == HDAA_CTL_IN) ctl->widget->connsenable[ctl->index] = 0; HDA_BOOTHVERBOSE( - device_printf(devinfo->dev, + device_printf(devinfo->dev, " Disabling crossassociatement connection " "ctl %d nid %d cnid %d.\n", i, ctl->widget->nid, @@ -4719,7 +4719,7 @@ hdaa_audio_assign_names(struct hdaa_devinfo *devinfo) int i, j; int type = -1, use, used = 0; static const int types[7][13] = { - { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2, + { SOUND_MIXER_LINE, SOUND_MIXER_LINE1, SOUND_MIXER_LINE2, SOUND_MIXER_LINE3, -1 }, /* line */ { SOUND_MIXER_MONITOR, SOUND_MIXER_MIC, -1 }, /* int mic */ { SOUND_MIXER_MIC, SOUND_MIXER_MONITOR, -1 }, /* ext mic */ @@ -5034,10 +5034,10 @@ hdaa_audio_prepare_pin_ctrl(struct hdaa_devinfo *devinfo) /* Disable everything. */ if (devinfo->init_clear) { w->wclass.pin.ctrl &= ~( - HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE | - HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE | - HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE | - HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK); + HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE | + HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE | + HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE | + HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK); } if (w->enable == 0) { @@ -5917,7 +5917,7 @@ hdaa_dump_dst_nid(struct hdaa_pcm_devinfo *pdevinfo, nid_t nid, int depth) printf("\n"); return; } - printf(" [src: %s]", + printf(" [src: %s]", hdaa_audio_ctl_ossmixer_mask2allname( w->ossmask, buf, sizeof(buf))); if (w->ossdev >= 0) { @@ -6246,10 +6246,10 @@ hdaa_configure(device_t dev) printf(" "); printf(" ossmask=0x%08x\n", ctl->ossmask); - device_printf(dev, + device_printf(dev, " mute: %d step: %3d size: %3d off: %3d%s\n", ctl->mute, ctl->step, ctl->size, ctl->offset, - (ctl->enable == 0) ? " [DISABLED]" : + (ctl->enable == 0) ? " [DISABLED]" : ((ctl->ossmask == 0) ? " [UNUSED]" : "")); } device_printf(dev, "\n"); @@ -7046,7 +7046,7 @@ hdaa_pcm_attach(device_t dev) } else pdevinfo->chan_blkcnt = HDA_BDL_DEFAULT; - /* + /* * We don't register interrupt handler with snd_setup_intr * in pcm device. Mark pcm device as MPSAFE manually. */ diff --git a/sys/dev/sound/pci/hda/hdaa.h b/sys/dev/sound/pci/hda/hdaa.h index 4fdc3fcead26..15a3db5edd04 100644 --- a/sys/dev/sound/pci/hda/hdaa.h +++ b/sys/dev/sound/pci/hda/hdaa.h @@ -252,10 +252,10 @@ struct hdaa_chan { #define RANGEQDB(ctl) \ ((ctl)->step * ((ctl)->size + 1)) -#define VAL2QDB(ctl, val) \ +#define VAL2QDB(ctl, val) \ (((ctl)->size + 1) * ((int)(val) - (ctl)->offset)) -#define QDB2VAL(ctl, qdb) \ +#define QDB2VAL(ctl, qdb) \ imax(imin((((qdb) + (ctl)->size / 2 * ((qdb) > 0 ? 1 : -1)) / \ ((ctl)->size + 1) + (ctl)->offset), (ctl)->step), 0) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 590c9e4d46fb..265697901a2b 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -44,6 +44,9 @@ #include #include +#include "pin_patch.h" +#include "pin_patch_realtek.h" + SND_DECLARE_FILE("$FreeBSD$"); static const struct { @@ -145,10 +148,28 @@ static const struct { 0 } }; +static struct pin_patch_t * +match_pin_patches(int vendor_id, int vendor_subid) +{ + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { + struct hdaa_model_pin_patch_t *p = &realtek_model_pin_patches[ci]; + if (vendor_id != p->id) + continue; + for (struct model_pin_patch_t *pp = p->patches; pp->models; pp++) { + for (struct pin_machine_model_t *model = pp->models; model->id != 0; model++) { + if (vendor_subid == model->id) + return (pp->pin_patches); + } + } + } + + return (0); +} + static void hdac_pin_patch(struct hdaa_widget *w) { - const char *patch = NULL; + const char *patch_str = NULL; uint32_t config, orig, id, subid; nid_t nid = w->nid; @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) id = hdaa_codec_id(w->devinfo); subid = hdaa_card_id(w->devinfo); - /* XXX: Old patches require complete review. - * Now they may create more problem then solve due to - * incorrect associations. - */ - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { - switch (nid) { - case 26: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; - break; - default: - break; - } - } else if (id == HDA_CODEC_ALC880 && - (subid == CLEVO_D900T_SUBVENDOR || - subid == ASUS_M5200_SUBVENDOR)) { - /* - * Super broken BIOS - */ - switch (nid) { - case 24: /* MIC1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 25: /* XXX MIC2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 26: /* LINE1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: /* XXX LINE2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 28: /* CD */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; - break; - } - } else if (id == HDA_CODEC_ALC883 && - (subid == MSI_MS034A_SUBVENDOR || - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid)) { switch (nid) { case 25: config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; break; } - } else if (id == HDA_CODEC_ALC861 && subid == - ASUS_W6F_SUBVENDOR) { - switch (nid) { - case 11: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 12: - case 14: - case 16: - case 31: - case 32: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } - } else if (id == HDA_CODEC_ALC861 && subid == - UNIWILL_9075_SUBVENDOR) { - switch (nid) { - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } } /* New patches */ @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_X300_SUBVENDOR) { switch (nid) { case 17: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 20: /* Two mics together */ - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; } } else if (id == HDA_CODEC_AD1986A && @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) subid == ASUS_P5PL2_SUBVENDOR)) { switch (nid) { case 26: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 28: /* 5.1 out => 2.0 out + 1 input */ - patch = "device=Line-in as=8 seq=1"; + patch_str = "device=Line-in as=8 seq=1"; break; case 29: /* Can't use this as input, as the only available mic * preamplifier is busy by front panel mic (nid 31). * If you want to use this rear connector as mic input, * you have to disable the front panel one. */ - patch = "as=0"; + patch_str = "as=0"; break; case 31: /* Lot of inputs configured with as=15 and unusable */ - patch = "as=8 seq=3"; + patch_str = "as=8 seq=3"; break; case 32: - patch = "as=8 seq=4"; + patch_str = "as=8 seq=4"; break; case 34: - patch = "as=8 seq=5"; + patch_str = "as=8 seq=5"; break; case 36: - patch = "as=8 seq=6"; - break; - } - } else if (id == HDA_CODEC_ALC260 && - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { - switch (nid) { - case 16: - patch = "seq=15 device=Headphones"; - break; - } - } else if (id == HDA_CODEC_ALC268) { - if (subid == ACER_T5320_SUBVENDOR) { - switch (nid) { - case 20: /* Headphones Jack */ - patch = "as=1 seq=15"; + patch_str = "as=8 seq=6"; break; } - } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_B450_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_T400_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 26: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; } } else if (id == HDA_CODEC_CX20590 && @@ -366,102 +289,63 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; /* * Group onboard mic and headphone mic * together. Fixes onboard mic. */ case 27: - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; case 35: - patch = "as=2"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - (subid == LENOVO_X1CRBN_SUBVENDOR || - subid == LENOVO_T430_SUBVENDOR || - subid == LENOVO_T430S_SUBVENDOR || - subid == LENOVO_T530_SUBVENDOR)) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC285 && - (subid == LENOVO_X120KH_SUBVENDOR || - subid == LENOVO_X120QD_SUBVENDOR)) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - subid == ASUS_UX31A_SUBVENDOR) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC892 && - subid == INTEL_DH87RL_SUBVENDOR) { - switch (nid) { - case 27: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC292 && - subid == LENOVO_X120BS_SUBVENDOR) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { - switch (nid) { - case 18: - patch = "as=2"; - break; - case 25: - patch = "as=2 seq=15"; - break; - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC298 && HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { - switch (nid) { - case 23: - config = 0x03a1103f; - break; - case 33: - config = 0x2121101f; - break; - } - } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { - switch (nid) { - case 24: - config = 0x01a1913c; - break; - case 26: - config = 0x01a1913d; + patch_str = "as=2"; break; } } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || subid == DELL_L7480_SUBVENDOR)) { switch (nid) { case 20: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; case 33: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } + } else { + /* + * loop over hdaa_model_pin_patch + */ + struct pin_patch_t *pin_patches = NULL; + + pin_patches = match_pin_patches(id, subid); + + if (pin_patches != NULL) { + for (struct pin_patch_t *patch = pin_patches; patch->type; patch++) { + if (nid == patch->nid) { + switch (patch->type) { + case PIN_PATCH_TYPE_STRING: + patch_str = patch->patch.string; + break; + case PIN_PATCH_TYPE_MASK: + config &= ~patch->patch.mask[0]; + config |= patch->patch.mask[1]; + break; + case PIN_PATCH_TYPE_OVERRIDE: + config = patch->patch.override; + break; + default: + /* should panic hard */ + break; + } + break; + } + } + } } - if (patch != NULL) - config = hdaa_widget_pin_patch(config, patch); + if (patch_str != NULL) + config = hdaa_widget_pin_patch(config, patch_str); HDA_BOOTVERBOSE( if (config != orig) device_printf(w->devinfo->dev, diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index c7f5e9dd5b5c..beed29e955d2 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -607,9 +607,9 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma *dma, bus_size_t size) BUS_SPACE_MAXADDR, /* highaddr */ NULL, /* filtfunc */ NULL, /* fistfuncarg */ - roundsz, /* maxsize */ + roundsz, /* maxsize */ 1, /* nsegments */ - roundsz, /* maxsegsz */ + roundsz, /* maxsegsz */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ @@ -1317,9 +1317,9 @@ hdac_attach(device_t dev) BUS_SPACE_MAXADDR, /* highaddr */ NULL, /* filtfunc */ NULL, /* fistfuncarg */ - HDA_BUFSZ_MAX, /* maxsize */ + HDA_BUFSZ_MAX, /* maxsize */ 1, /* nsegments */ - HDA_BUFSZ_MAX, /* maxsegsz */ + HDA_BUFSZ_MAX, /* maxsegsz */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index d74130ba4cb9..f30caf8b001f 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -61,6 +61,7 @@ #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) @@ -90,9 +91,18 @@ #define HDA_INTEL_CNLK HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8) #define HDA_INTEL_ICLK HDA_MODEL_CONSTRUCT(INTEL, 0x34c8) #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) -#define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) +#define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -202,6 +212,10 @@ /* HP/Compaq */ #define HP_VENDORID 0x103c +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) @@ -211,6 +225,7 @@ #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_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) /* What is wrong with XN 2563 anyway? (Got the picture ?) */ @@ -226,7 +241,28 @@ #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) @@ -237,34 +273,66 @@ /* Acer */ #define ACER_VENDORID 0x1025 +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) /* Asus */ #define ASUS_VENDORID 0x1043 +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) /* IBM / Lenovo */ @@ -291,7 +359,11 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ @@ -311,8 +383,19 @@ /* Sony */ #define SONY_VENDORID 0x104d #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) +/* Tyan? */ +#define TYAN_VENDORID 0x10f1 +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) + /* * Apple Intel MacXXXX seems using Sigmatel codec/vendor id * instead of their own, which is beyond my comprehension @@ -326,18 +409,32 @@ /* LG Electronics */ #define LG_VENDORID 0x1854 #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) /* Fujitsu Siemens */ #define FS_VENDORID 0x1734 #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) /* Fujitsu Limited */ #define FL_VENDORID 0x10cf #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) /* Toshiba */ @@ -350,18 +447,61 @@ #define MSI_VENDORID 0x1462 #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) /* Giga-Byte Technology */ #define GB_VENDORID 0x1458 #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) /* Uniwill ? */ #define UNIWILL_VENDORID 0x1584 #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075) *** 1208 LINES SKIPPED ***