* added idt codec vendor id
* added quirks for idt 0x76b2 and apple macbook 0x00a1 * add headphones to the output path in case one input has a path to a used output git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37012 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
#define ANALOGDEVICES_VENDORID 0x11d4
|
#define ANALOGDEVICES_VENDORID 0x11d4
|
||||||
#define CIRRUSLOGIC_VENDORID 0x1013
|
#define CIRRUSLOGIC_VENDORID 0x1013
|
||||||
#define CONEXANT_VENDORID 0x14f1
|
#define CONEXANT_VENDORID 0x14f1
|
||||||
|
#define IDT_VENDORID 0x111d
|
||||||
#define REALTEK_VENDORID 0x10ec
|
#define REALTEK_VENDORID 0x10ec
|
||||||
#define SIGMATEL_VENDORID 0x8384
|
#define SIGMATEL_VENDORID 0x8384
|
||||||
|
|
||||||
@@ -818,8 +819,10 @@ hda_codec_parse_audio_group(hda_audio_group* audioGroup)
|
|||||||
/*! Find output path for widget */
|
/*! Find output path for widget */
|
||||||
static bool
|
static bool
|
||||||
hda_widget_find_output_path(hda_audio_group* audioGroup, hda_widget* widget,
|
hda_widget_find_output_path(hda_audio_group* audioGroup, hda_widget* widget,
|
||||||
uint32 depth)
|
uint32 depth, bool &alreadyUsed)
|
||||||
{
|
{
|
||||||
|
alreadyUsed = false;
|
||||||
|
|
||||||
if (widget == NULL || depth > 16)
|
if (widget == NULL || depth > 16)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -833,8 +836,10 @@ TRACE(" %*soutput: added output widget %ld\n", (int)depth * 2, "", widget->
|
|||||||
case WT_AUDIO_SELECTOR:
|
case WT_AUDIO_SELECTOR:
|
||||||
{
|
{
|
||||||
// already used
|
// already used
|
||||||
if (widget->flags & WIDGET_FLAG_OUTPUT_PATH)
|
if (widget->flags & WIDGET_FLAG_OUTPUT_PATH) {
|
||||||
|
alreadyUsed = true;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// search for output in this path
|
// search for output in this path
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -843,7 +848,7 @@ TRACE(" %*soutput: added output widget %ld\n", (int)depth * 2, "", widget->
|
|||||||
widget->inputs[i]);
|
widget->inputs[i]);
|
||||||
|
|
||||||
if (hda_widget_find_output_path(audioGroup, inputWidget,
|
if (hda_widget_find_output_path(audioGroup, inputWidget,
|
||||||
depth + 1)) {
|
depth + 1, alreadyUsed)) {
|
||||||
if (widget->active_input == -1)
|
if (widget->active_input == -1)
|
||||||
widget->active_input = i;
|
widget->active_input = i;
|
||||||
|
|
||||||
@@ -930,7 +935,8 @@ TRACE("build output tree: %suse mixer\n", useMixer ? "" : "don't ");
|
|||||||
for (uint32 i = 0; i < audioGroup->widget_count; i++) {
|
for (uint32 i = 0; i < audioGroup->widget_count; i++) {
|
||||||
hda_widget& widget = audioGroup->widgets[i];
|
hda_widget& widget = audioGroup->widgets[i];
|
||||||
|
|
||||||
if (widget.type != WT_PIN_COMPLEX || !PIN_CAP_IS_OUTPUT(widget.d.pin.capabilities))
|
if (widget.type != WT_PIN_COMPLEX
|
||||||
|
|| !PIN_CAP_IS_OUTPUT(widget.d.pin.capabilities))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int device = CONF_DEFAULT_DEVICE(widget.d.pin.config);
|
int device = CONF_DEFAULT_DEVICE(widget.d.pin.config);
|
||||||
@@ -952,7 +958,12 @@ TRACE(" try widget %ld: %p\n", widget.inputs[j], inputWidget);
|
|||||||
continue;
|
continue;
|
||||||
TRACE(" widget %ld is candidate\n", inputWidget->node_id);
|
TRACE(" widget %ld is candidate\n", inputWidget->node_id);
|
||||||
|
|
||||||
if (hda_widget_find_output_path(audioGroup, inputWidget, 0)) {
|
bool alreadyUsed = false;
|
||||||
|
if (hda_widget_find_output_path(audioGroup, inputWidget, 0,
|
||||||
|
alreadyUsed)
|
||||||
|
|| (device == PIN_DEV_HEAD_PHONE_OUT && alreadyUsed)) {
|
||||||
|
// find the output path to an audio output widget
|
||||||
|
// or for headphones, an already used widget
|
||||||
TRACE(" add pin widget %ld\n", widget.node_id);
|
TRACE(" add pin widget %ld\n", widget.node_id);
|
||||||
if (widget.active_input == -1)
|
if (widget.active_input == -1)
|
||||||
widget.active_input = j;
|
widget.active_input = j;
|
||||||
@@ -1044,7 +1055,7 @@ TRACE("build tree!\n");
|
|||||||
|
|
||||||
// GPIO
|
// GPIO
|
||||||
uint32 gpio = 0;
|
uint32 gpio = 0;
|
||||||
for (int32 i = 0; i < GPIO_COUNT_NUM_GPIO(audioGroup->gpio)
|
for (uint32 i = 0; i < GPIO_COUNT_NUM_GPIO(audioGroup->gpio)
|
||||||
&& i < HDA_QUIRK_GPIO_COUNT; i++) {
|
&& i < HDA_QUIRK_GPIO_COUNT; i++) {
|
||||||
if (audioGroup->codec->quirks & (1 << i)) {
|
if (audioGroup->codec->quirks & (1 << i)) {
|
||||||
gpio |= (1 << i);
|
gpio |= (1 << i);
|
||||||
@@ -1334,7 +1345,9 @@ static const struct {
|
|||||||
{ HDA_ALL, HDA_ALL, HDA_ALL, HDA_ALL, HDA_QUIRK_IVREF, 0 },
|
{ HDA_ALL, HDA_ALL, HDA_ALL, HDA_ALL, HDA_QUIRK_IVREF, 0 },
|
||||||
{ 0x10de, 0xcb79, CIRRUSLOGIC_VENDORID, 0x4206, HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 }, // MacBook Pro 5.5
|
{ 0x10de, 0xcb79, CIRRUSLOGIC_VENDORID, 0x4206, HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 }, // MacBook Pro 5.5
|
||||||
{ 0x8384, 0x7680, SIGMATEL_VENDORID, 0x7680, HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0}, // Apple Intel Mac
|
{ 0x8384, 0x7680, SIGMATEL_VENDORID, 0x7680, HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0}, // Apple Intel Mac
|
||||||
|
{ 0x106b, 0x00a1, REALTEK_VENDORID, 0x0885, HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0}, // MacBook
|
||||||
{ 0x106b, 0x00a3, REALTEK_VENDORID, 0x0885, HDA_QUIRK_GPIO0, 0}, // MacBook
|
{ 0x106b, 0x00a3, REALTEK_VENDORID, 0x0885, HDA_QUIRK_GPIO0, 0}, // MacBook
|
||||||
|
{ HDA_ALL, HDA_ALL, IDT_VENDORID, 0x76b2, HDA_QUIRK_GPIO0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user