11 func (i azalia
) Scan(ctx Context
, addr PCIDevData
) {
12 az
:= Create(ctx
, "hda_verb.c")
17 `#include <device/azalia_device.h>
19 const u32 cim_verb_data[] = {
22 for _
, codec
:= range ctx
.InfoSource
.GetAzaliaCodecs() {
23 fmt
.Fprintf(az
, "\t0x%08x,\t/* Codec Vendor / Device ID: %s */\n",
24 codec
.VendorID
, codec
.Name
)
25 fmt
.Fprintf(az
, "\t0x%08x,\t/* Subsystem ID */\n",
27 fmt
.Fprintf(az
, "\t%d,\t\t/* Number of 4 dword sets */\n",
28 len(codec
.PinConfig
)+1)
29 fmt
.Fprintf(az
, "\tAZALIA_SUBVENDOR(%d, 0x%08x),\n",
30 codec
.CodecNo
, codec
.SubsystemID
)
33 for nid
, _
:= range codec
.PinConfig
{
34 keys
= append(keys
, nid
)
39 for _
, nid
:= range keys
{
40 fmt
.Fprintf(az
, "\tAZALIA_PIN_CFG(%d, 0x%02x, 0x%08x),\n",
41 codec
.CodecNo
, nid
, codec
.PinConfig
[nid
])
49 const u32 pc_beep_verbs[0] = {};
59 RegisterPCI(0x8086, 0x27d8, azalia
{})
60 /* BD82X6X/sandybridge */
61 RegisterPCI(0x8086, 0x1c20, azalia
{})
63 RegisterPCI(0x8086, 0x1e20, azalia
{})