[haiku-commits] haiku: hrev47804 - src/add-ons/kernel/drivers/audio/hda

  • From: julian.harnath@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 4 Sep 2014 00:47:20 +0200 (CEST)

hrev47804 adds 2 changesets to branch 'master'
old head: 1a23bff7962c5e5dbc960b07c483083c5498d3f9
new head: 08e98ffde1d253bd55cec08785204071440f2039
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=08e98ff+%5E1a23bff

----------------------------------------------------------------------------

7ef10f8: Relaxed CORB read pointer reset checking for nVidia HDA
  
  * At least some nVidia HDA controllers do not acknowledge the CORB
    read pointer reset, which is required by the spec (cf. HDA 1.0a
    ch. 3.3.21). For these controllers, do not fail when acknowledge
    is missing.
  
  * Makes hda driver work for nVidia HDA controllers again, thus fixing
    the regression pointed out in #10212.

08e98ff: Style fix: line length

                          [ Julian Harnath <julian.harnath@xxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 3 deletions(-)
src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp | 13 ++++++++++---

############################################################################

Commit:      7ef10f899a2ea6484a3e72c457e26e7d510f6fe4
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7ef10f8
Author:      Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
Date:        Wed Sep  3 22:34:10 2014 UTC

Ticket:      https://dev.haiku-os.org/ticket/10212

Relaxed CORB read pointer reset checking for nVidia HDA

* At least some nVidia HDA controllers do not acknowledge the CORB
  read pointer reset, which is required by the spec (cf. HDA 1.0a
  ch. 3.3.21). For these controllers, do not fail when acknowledge
  is missing.

* Makes hda driver work for nVidia HDA controllers again, thus fixing
  the regression pointed out in #10212.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
index 59f44e7..ab93c57 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
@@ -537,8 +537,14 @@ init_corb_rirb_pos(hda_controller* controller)
                        break;
        }
        if ((corbReadPointer & CORB_READ_POS_RESET) == 0) {
-               dprintf("hda: CORB read pointer reset failed\n");
-               return B_BUSY;
+               dprintf("hda: CORB read pointer reset not acknowledged\n");
+
+               // According to HDA spec v1.0a ch3.3.21, software must read the
+               // bit as 1 to verify that the reset completed. However, at 
least
+               // some nVidia HDA controllers do not update the bit after 
reset.
+               // Thus don't fail here on nVidia controllers.
+               if (controller->pci_info.vendor_id != PCI_VENDOR_NVIDIA)
+                       return B_BUSY;
        }
 
        corbReadPointer &= ~CORB_READ_POS_RESET;

############################################################################

Revision:    hrev47804
Commit:      08e98ffde1d253bd55cec08785204071440f2039
URL:         http://cgit.haiku-os.org/haiku/commit/?id=08e98ff
Author:      Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
Date:        Wed Sep  3 22:41:09 2014 UTC

Style fix: line length

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
index ab93c57..e686f79 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
@@ -1050,7 +1050,8 @@ hda_hw_init(hda_controller* controller)
                }
        }
 
-       dprintf("hda: DMA snooping: %s\n", controller->dma_snooping ? "yes" : 
"no");
+       dprintf("hda: DMA snooping: %s\n",
+               controller->dma_snooping ? "yes" : "no");
 
        capabilities = controller->Read16(HDAC_GLOBAL_CAP);
        controller->num_input_streams = GLOBAL_CAP_INPUT_STREAMS(capabilities);


Other related posts:

  • » [haiku-commits] haiku: hrev47804 - src/add-ons/kernel/drivers/audio/hda - julian . harnath