summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-08-02 17:13:32 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-08-02 17:13:32 +0000
commitf9108748b2cc06ff8b9f5d6c2543cfbde69c13c4 (patch)
tree0bd6923506f187d3aec61da4e9c9b8c6014fd77b
parenteaf92544865665a0b1e91b7e4d8f919073fa0f5d (diff)
print the vendor id string for unknown azalia codecs if we find it in
the pcidevs database. ok deanna@
-rw-r--r--sys/dev/pci/azalia.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index f466d07b004..5c1eafd129f 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.28 2007/06/19 00:06:51 deanna Exp $ */
+/* $OpenBSD: azalia.c,v 1.29 2007/08/02 17:13:31 reyk Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1050,6 +1050,7 @@ azalia_codec_init(codec_t *this)
{
uint32_t rev, id, result;
int err, addr, n, i;
+ const char *vendor;
this->comresp = azalia_codec_comresp;
addr = this->address;
@@ -1069,9 +1070,13 @@ azalia_codec_init(codec_t *this)
azalia_codec_init_vtbl(this);
printf("%s: codec:", XNAME(this->az));
- if (this->name == NULL)
- printf(" 0x%04x/0x%04x", id >> 16, id & 0xffff);
- else
+ if (this->name == NULL) {
+ vendor = pci_findvendor(id >> 16);
+ if (vendor == NULL)
+ printf(" 0x%04x/0x%04x", id >> 16, id & 0xffff);
+ else
+ printf(" %s/0x%04x", vendor, id & 0xffff);
+ } else
printf(" %s", this->name);
printf(" (rev. %u.%u), HDA version %u.%u\n",
COP_RID_REVISION(rev), COP_RID_STEPPING(rev),