Fixed 64 bit issue for the buffer descriptor base.
This commit is contained in:
parent
7406bc63f6
commit
0aff7183d9
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2008, Haiku, Inc. All Rights Reserved.
|
* Copyright 2007-2012, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@ -161,7 +161,7 @@ struct hda_stream {
|
|||||||
|
|
||||||
area_id buffer_area;
|
area_id buffer_area;
|
||||||
area_id buffer_descriptors_area;
|
area_id buffer_descriptors_area;
|
||||||
uint32 physical_buffer_descriptors; /* BDL physical address */
|
phys_addr_t physical_buffer_descriptors; /* BDL physical address */
|
||||||
|
|
||||||
int32 incorrect_position_count;
|
int32 incorrect_position_count;
|
||||||
bool use_dma_position;
|
bool use_dma_position;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2010, Haiku, Inc. All Rights Reserved.
|
* Copyright 2007-2012, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@ -670,12 +670,11 @@ hda_stream_setup_buffers(hda_audio_group* audioGroup, hda_stream* stream,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->physical_buffer_descriptors = (uint32)pe.address;
|
stream->physical_buffer_descriptors = pe.address;
|
||||||
|
|
||||||
dprintf("%s(%s): Allocated %ld bytes for %ld BDLEs\n", __func__, desc,
|
dprintf("%s(%s): Allocated %ld bytes for %ld BDLEs\n", __func__, desc,
|
||||||
alloc, bdlCount);
|
alloc, bdlCount);
|
||||||
|
|
||||||
|
|
||||||
/* Setup buffer descriptor list (BDL) entries */
|
/* Setup buffer descriptor list (BDL) entries */
|
||||||
uint32 fragments = 0;
|
uint32 fragments = 0;
|
||||||
for (uint32 index = 0; index < stream->num_buffers;
|
for (uint32 index = 0; index < stream->num_buffers;
|
||||||
@ -689,13 +688,14 @@ hda_stream_setup_buffers(hda_audio_group* audioGroup, hda_stream* stream,
|
|||||||
// we want an interrupt after every buffer
|
// we want an interrupt after every buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure stream registers */
|
// Configure stream registers
|
||||||
stream->Write16(HDAC_STREAM_FORMAT, format);
|
stream->Write16(HDAC_STREAM_FORMAT, format);
|
||||||
stream->Write32(HDAC_STREAM_BUFFERS_BASE_LOWER,
|
stream->Write32(HDAC_STREAM_BUFFERS_BASE_LOWER,
|
||||||
stream->physical_buffer_descriptors);
|
(uint32)stream->physical_buffer_descriptors);
|
||||||
stream->Write32(HDAC_STREAM_BUFFERS_BASE_UPPER, 0);
|
stream->Write32(HDAC_STREAM_BUFFERS_BASE_UPPER,
|
||||||
|
(uint32)(stream->physical_buffer_descriptors >> 32));
|
||||||
stream->Write16(HDAC_STREAM_LAST_VALID, fragments - 1);
|
stream->Write16(HDAC_STREAM_LAST_VALID, fragments - 1);
|
||||||
/* total cyclic buffer size in _bytes_ */
|
// total cyclic buffer size in _bytes_
|
||||||
stream->Write32(HDAC_STREAM_BUFFER_SIZE, stream->buffer_size
|
stream->Write32(HDAC_STREAM_BUFFER_SIZE, stream->buffer_size
|
||||||
* stream->num_buffers);
|
* stream->num_buffers);
|
||||||
stream->Write8(HDAC_STREAM_CONTROL2, stream->id << CONTROL2_STREAM_SHIFT);
|
stream->Write8(HDAC_STREAM_CONTROL2, stream->id << CONTROL2_STREAM_SHIFT);
|
||||||
|
Loading…
Reference in New Issue
Block a user