[haiku-commits] r34730 - haiku/trunk/src/add-ons/kernel/drivers/audio/hda

Author: korli
Date: 2009-12-21 12:05:12 +0100 (Mon, 21 Dec 2009)
New Revision: 34730
Changeset: http://dev.haiku-os.org/changeset/34730/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/drivers/audio/hda/driver.h
   haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
Log:
* warn_count is unused.
* the last valid index should be written in HDAC_STREAM_LAST_VALID instead of 
the fragment count.


Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/hda/driver.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/audio/hda/driver.h   2009-12-20 
22:52:01 UTC (rev 34729)
+++ haiku/trunk/src/add-ons/kernel/drivers/audio/hda/driver.h   2009-12-21 
11:05:12 UTC (rev 34730)
@@ -132,7 +132,6 @@
        bool            running;
        spinlock        lock;                           /* Write lock */
        uint32          type;
-       int32           warn_count;
 
        hda_controller* controller;
 

Modified: haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
2009-12-20 22:52:01 UTC (rev 34729)
+++ haiku/trunk/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
2009-12-21 11:05:12 UTC (rev 34730)
@@ -481,7 +481,6 @@
        stream->buffer_descriptors_area = B_ERROR;
        stream->type = type;
        stream->controller = controller;
-       stream->warn_count = 0;
        stream->incorrect_position_count = 0;
        stream->use_dma_position = true;
 
@@ -694,7 +693,7 @@
        stream->Write32(HDAC_STREAM_BUFFERS_BASE_LOWER,
                stream->physical_buffer_descriptors);
        stream->Write32(HDAC_STREAM_BUFFERS_BASE_UPPER, 0);
-       stream->Write16(HDAC_STREAM_LAST_VALID, fragments);
+       stream->Write16(HDAC_STREAM_LAST_VALID, fragments - 1);
        /* total cyclic buffer size in _bytes_ */
        stream->Write32(HDAC_STREAM_BUFFER_SIZE, stream->buffer_size
                * stream->num_buffers);


Other related posts:

  • » [haiku-commits] r34730 - haiku/trunk/src/add-ons/kernel/drivers/audio/hda - korli