Chameleon

Chameleon Commit Details

Date:2015-02-12 23:19:52 (4 years 5 months ago)
Author:ErmaC
Commit:2575
Parents: 2574
Message:Typo & credits
Changes:
M/trunk/i386/libsaio/hda.h
M/trunk/i386/libsaio/platform.h
M/trunk/i386/libsaio/hda.c

File differences

trunk/i386/libsaio/hda.c
33
44
55
6
67
78
89
......
6667
6768
6869
69
70
7071
7172
7273
......
8687
8788
8889
89
90
9091
9192
9293
......
553554
554555
555556
556
557
557558
558559
559560
560561
561562
563
564
565
566
562567
563568
564569
......
583588
584589
585590
586
587
588
589
590591
591592
592593
......
679680
680681
681682
682
683
684
685
686
687
683
684
685
686
687
688
688689
689690
690691
*
*Copyright (C) 2012Chameleon Team
*Edit by Fabio (ErmaC)
*HDA bus scans and codecs enumeration by Zenith432
*
*HDA injector is free software: you can redistribute it and/or modify
*it under the terms of the GNU General Public License as published by
#include "platform.h"
#include "device_inject.h"
#include "hda.h"
#include "aml_generator.h"
//#include "aml_generator.h"
#ifndef DEBUG_HDA
#define DEBUG_HDA 0
#define HDEF_LEN ( sizeof(default_HDEF_layout_id) / sizeof(uint8_t) )
uint8_t default_HDAU_layout_id[]={0x01, 0x00, 0x00, 0x00};
#define HDAU_LEN ( sizeof(default_HDAU_layout_id) / sizeof(uint8_t) )
uint8_t connector_type_value[] ={0x00, 0x08, 0x00, 0x00};
static uint8_t connector_type_value[] ={0x00, 0x08, 0x00, 0x00};
/* Structures */
structDevPropDevice*device = NULL;
char*devicepath = NULL;
char*controller_name = NULL;
int len;
intlen;
uint8_tBuiltIn = 0x00;
uint16_tcontroller_vendor_id = hda_dev->vendor_id;
uint16_tcontroller_device_id = hda_dev->device_id;
const char*value;
verbose("\n------------------------\n");
verbose("\tAUDIO DEVICE INFO\n");
verbose("-------------------------\n");
devicepath = get_pci_dev_path(hda_dev);
controller_name = get_hda_controller_name(controller_device_id, controller_vendor_id);
}
devprop_add_hda_template(device);
verbose("\n--------------------------------\n");
verbose("- AUDIO DEVICE INFO -\n");
verbose("--------------------------------\n");
switch ((controller_device_id << 16) | controller_vendor_id)
{
default_HDAU_layout_id[0], default_HDAU_layout_id[1], default_HDAU_layout_id[2], default_HDAU_layout_id[3]);
}
devprop_add_value(device, "layout-id", default_HDAU_layout_id, HDAU_LEN); /*FIX ME*/
devprop_add_value(device, "@0,connector-type", connector_type_value, 4);
devprop_add_value(device, "@1,connector-type", connector_type_value, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-2", 10);
devprop_add_value(device, "built-in", &BuiltIn, 1);
break;
devprop_add_value(device, "layout-id", default_HDAU_layout_id, HDAU_LEN); /*FIX ME*/
devprop_add_value(device, "@0,connector-type", connector_type_value, 4);
devprop_add_value(device, "@1,connector-type", connector_type_value, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-2", 10);
devprop_add_value(device, "built-in", &BuiltIn, 1);
break;
/*************************************************************************************************************
* The above case are intended as for HDAU (ATi) device onboard audio for GFX card with Audio controller HDMi
trunk/i386/libsaio/hda.h
6565
6666
6767
68
68
69
6970
7071
7172
......
7475
7576
7677
77
78
79
80
78
79
80
81
82
8183
8284
8385
bool setup_hda_devprop(pci_dt_t *hda_dev);
struct hda_controller_devices;
typedef struct {
typedef struct
{
uint32_tmodel;
char*desc;
// charquirks_on;
/*
struct hdacc_codecs;
typedef struct {
uint32_t cid;
uint16_t revid;
char *name;
typedef struct
{
uint32_t cid;
uint16_t revid;
char *name;
} hdacc_codecs;
*/
trunk/i386/libsaio/platform.h
413413
414414
415415
416
416
417417
418418
419419
uint8_tType;// system-type: 1=Desktop, 2=Portable, 3=Workstation... according ACPI2.0 (FACP: PM_Profile)
uint8_t*UUID;// system-id (SMBIOS Table 1: system uuid)
//uint32_tHWSignature;// machine-signature (FACS: Hardware Signature)
} PlatformInfo_t;
extern PlatformInfo_t Platform;

Archive Download the corresponding diff file

Revision: 2575