From Ryan Leavengood <leavengood@xxxxxxxxx>:
Ryan Leavengood has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/2227 ;)
Change subject: HDA: Ignore pins which are not connected
......................................................................
HDA: Ignore pins which are not connected
---
M src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/27/2227/1
diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
b/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
index 8c377ab..d360c8b 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
@@ -1,11 +1,12 @@
/*
- * Copyright 2007-2012, Haiku, Inc. All Rights Reserved.
+ * Copyright 2007-2020, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ithamar Adema, ithamar AT unet DOT nl
* Axel Dörfler, axeld@xxxxxxxxxxxxxxxx
* Jérôme Duval, korli@xxxxxxxxxxxxxxxx
+ * Ryan Leavengood, leavengood@xxxxxxxxx
*/
@@ -651,6 +652,8 @@
if (widget.type != WT_PIN_COMPLEX)
continue;
+ if (CONF_DEFAULT_CONNTYPE(widget.d.pin.config) ==
PIN_CONN_NONE)
+ continue;
if (CONF_DEFAULT_ASSOCIATION(widget.d.pin.config) != i)
continue;
if (audioGroup->associations[index].pin_count == 0) {
@@ -966,6 +969,9 @@
& (WIDGET_FLAG_INPUT_PATH |
WIDGET_FLAG_OUTPUT_PATH)) != 0)
return false;
+ if (CONF_DEFAULT_CONNTYPE(widget->d.pin.config) ==
PIN_CONN_NONE)
+ return false;
+
if (PIN_CAP_IS_INPUT(widget->d.pin.capabilities)) {
switch
(CONF_DEFAULT_DEVICE(widget->d.pin.config)) {
case PIN_DEV_CD:
@@ -1025,7 +1031,8 @@
hda_widget& widget = audioGroup->widgets[i];
if (widget.type != WT_PIN_COMPLEX
- || !PIN_CAP_IS_OUTPUT(widget.d.pin.capabilities))
+ || !PIN_CAP_IS_OUTPUT(widget.d.pin.capabilities)
+ || CONF_DEFAULT_CONNTYPE(widget.d.pin.config) ==
PIN_CONN_NONE)
continue;
int device = CONF_DEFAULT_DEVICE(widget.d.pin.config);
--
To view, visit https://review.haiku-os.org/c/haiku/+/2227
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ia1eb266cb4579df1562f38050d0fa445680cefc5
Gerrit-Change-Number: 2227
Gerrit-PatchSet: 1
Gerrit-Owner: Ryan Leavengood <leavengood@xxxxxxxxx>
Gerrit-MessageType: newchange