USB audio: Fix building on x86_64
* fix x86_64 build errors and warnings pointed out by Diver; * fix warning building with gcc2.
This commit is contained in:
@@ -254,7 +254,7 @@ publish_devices()
|
|||||||
MutexLocker driverLock;
|
MutexLocker driverLock;
|
||||||
|
|
||||||
int32 deviceCount = 0;
|
int32 deviceCount = 0;
|
||||||
for (int32 i = 0; i < MAX_DEVICES; i++) {
|
for (size_t i = 0; i < MAX_DEVICES; i++) {
|
||||||
if (gDevices[i] == NULL)
|
if (gDevices[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ Stream::_ChooseAlternate()
|
|||||||
== USB_ENDPOINT_ADDR_DIR_IN;
|
== USB_ENDPOINT_ADDR_DIR_IN;
|
||||||
|
|
||||||
if (fIsInput)
|
if (fIsInput)
|
||||||
fCurrentBuffer = -1;
|
fCurrentBuffer = (size_t)-1;
|
||||||
|
|
||||||
TRACE(INF, "Alternate %d EP:%x selected for %s!\n",
|
TRACE(INF, "Alternate %d EP:%x selected for %s!\n",
|
||||||
fActiveAlternate, endpoint->fEndpointAddress,
|
fActiveAlternate, endpoint->fEndpointAddress,
|
||||||
@@ -306,8 +306,8 @@ Stream::_QueueNextTransfer(size_t queuedBuffer, bool start)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Stream::_TransferCallback(void* cookie, int32 status, void* data,
|
Stream::_TransferCallback(void* cookie, status_t status, void* data,
|
||||||
uint32 actualLength)
|
size_t actualLength)
|
||||||
{
|
{
|
||||||
Stream* stream = (Stream*)cookie;
|
Stream* stream = (Stream*)cookie;
|
||||||
atomic_add(&stream->fInsideNotify, 1);
|
atomic_add(&stream->fInsideNotify, 1);
|
||||||
@@ -371,10 +371,11 @@ Stream::SetEnabledChannels(uint32& offset, multi_channel_enable* Enable)
|
|||||||
if (cluster == 0)
|
if (cluster == 0)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
for (size_t i = 0; i < cluster->ChannelsCount(); i++)
|
for (size_t i = 0; i < cluster->ChannelsCount(); i++, offset++) {
|
||||||
TRACE(INF, "%s channel %d.\n",
|
TRACE(INF, "%s channel %d.\n",
|
||||||
(B_TEST_CHANNEL(Enable->enable_bits, offset++)
|
(B_TEST_CHANNEL(Enable->enable_bits, offset)
|
||||||
? "Enable" : "Disable"), offset + 1);
|
? "Enable" : "Disable"), offset + 1);
|
||||||
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ private:
|
|||||||
status_t _ChooseAlternate();
|
status_t _ChooseAlternate();
|
||||||
status_t _SetupBuffers();
|
status_t _SetupBuffers();
|
||||||
status_t _QueueNextTransfer(size_t buffer, bool start);
|
status_t _QueueNextTransfer(size_t buffer, bool start);
|
||||||
static void _TransferCallback(void* cookie, int32 status,
|
static void _TransferCallback(void* cookie, status_t status,
|
||||||
void* data, uint32 actualLength);
|
void* data, size_t actualLength);
|
||||||
void _DumpDescriptors();
|
void _DumpDescriptors();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user