mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
geode audio: fix almost all warnings, enable -Werror
The compiler complains about implicit declaration of free and calloc despite stdlib.h being included. I think it's because of -ffreestanding being used on the command line? Change-Id: I57c3899e5034d1c2ee9cb6c1ed4c92aa818b53ea Reviewed-on: https://review.haiku-os.org/c/haiku/+/7619 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Alexander von Gluck <alex@terarocket.io>
This commit is contained in:
parent
e7e9e58fbd
commit
98afcfa72a
@ -674,12 +674,7 @@ rule ArchitectureSetupWarnings architecture
|
||||
EnableWerror src add-ons kernel console ;
|
||||
EnableWerror src add-ons kernel cpu ;
|
||||
EnableWerror src add-ons kernel debugger ;
|
||||
# EnableWerror src add-ons kernel drivers audio ac97 ;
|
||||
EnableWerror src add-ons kernel drivers audio ac97 auich ;
|
||||
EnableWerror src add-ons kernel drivers audio ac97 auvia ;
|
||||
EnableWerror src add-ons kernel drivers audio ac97 es1370 ;
|
||||
# EnableWerror src add-ons kernel drivers audio ac97 geode ;
|
||||
EnableWerror src add-ons kernel drivers audio ac97 sis7018 ;
|
||||
EnableWerror src add-ons kernel drivers audio ac97 ;
|
||||
# EnableWerror src add-ons kernel drivers audio cmedia ;
|
||||
EnableWerror src add-ons kernel drivers audio echo ;
|
||||
EnableWerror src add-ons kernel drivers audio emuxki ;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define DEVFS_PATH_FORMAT "audio/hmulti/geode/%lu"
|
||||
#define DEVFS_PATH_FORMAT "audio/hmulti/geode/%" B_PRIu32
|
||||
#include <hmulti_audio.h>
|
||||
|
||||
#include "ac97.h"
|
||||
|
@ -297,7 +297,8 @@ geode_stream_setup_buffers(geode_stream* stream, const char* desc)
|
||||
* stream->buffer_length;
|
||||
bufferSize = ALIGN(bufferSize, 128);
|
||||
|
||||
dprintf("geode: sample size %ld, num channels %ld, buffer length %ld ****************\n",
|
||||
dprintf("geode: sample size %" B_PRIu32 ", num channels %" B_PRIu32 ", buffer length %"
|
||||
B_PRIu32 "\n",
|
||||
stream->sample_size, stream->num_channels, stream->buffer_length);
|
||||
|
||||
/* Calculate total size of all buffers (aligned to size of B_PAGE_SIZE) */
|
||||
@ -322,7 +323,7 @@ geode_stream_setup_buffers(geode_stream* stream, const char* desc)
|
||||
|
||||
phys_addr_t bufferPhysicalAddress = pe.address;
|
||||
|
||||
dprintf("%s(%s): Allocated %lu bytes for %ld buffers\n", __func__, desc,
|
||||
dprintf("%s(%s): Allocated %" B_PRId32 " bytes for %" B_PRIu32 " buffers\n", __func__, desc,
|
||||
alloc, stream->num_buffers);
|
||||
|
||||
/* Store pointers (both virtual/physical) */
|
||||
@ -356,7 +357,7 @@ geode_stream_setup_buffers(geode_stream* stream, const char* desc)
|
||||
|
||||
stream->physical_buffer_descriptors = pe.address;
|
||||
|
||||
dprintf("%s(%s): Allocated %ld bytes for %ld BDLEs\n", __func__, desc,
|
||||
dprintf("%s(%s): Allocated %" B_PRIu32 " bytes for %" B_PRIu32 " BDLEs\n", __func__, desc,
|
||||
alloc, stream->num_buffers);
|
||||
|
||||
/* Setup buffer descriptor list (BDL) entries */
|
||||
@ -376,7 +377,7 @@ geode_stream_setup_buffers(geode_stream* stream, const char* desc)
|
||||
}
|
||||
|
||||
/* Configure stream registers */
|
||||
dprintf("IRA: %s: setup stream SR=%ld\n", __func__, stream->rate);
|
||||
dprintf("IRA: %s: setup stream SR=%" B_PRIu32 "\n", __func__, stream->rate);
|
||||
|
||||
stream->Write32(STREAM_PRD, stream->physical_buffer_descriptors);
|
||||
|
||||
@ -442,7 +443,7 @@ reset_failed:
|
||||
remove_io_interrupt_handler(controller->irq,
|
||||
(interrupt_handler)geode_interrupt_handler, controller);
|
||||
error:
|
||||
dprintf("geode: ERROR: %s(%ld)\n", strerror(status), status);
|
||||
dprintf("geode: ERROR: %s(%" B_PRId32 ")\n", strerror(status), status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -83,8 +83,7 @@ get_description(geode_controller* controller, multi_description* data)
|
||||
data->input_bus_channel_count = inChannels;
|
||||
data->aux_bus_channel_count = 0;
|
||||
|
||||
dprintf("%s: request_channel_count: %ld\n", __func__,
|
||||
data->request_channel_count);
|
||||
dprintf("%s: request_channel_count: %" B_PRId32 "\n", __func__, data->request_channel_count);
|
||||
|
||||
if (data->request_channel_count >= (int)(sizeof(sChannels)
|
||||
/ sizeof(sChannels[0]))) {
|
||||
@ -519,7 +518,7 @@ create_controls_list(geode_multi *multi)
|
||||
}
|
||||
|
||||
multi->control_count = index;
|
||||
TRACE("multi->control_count %lu\n", multi->control_count);
|
||||
TRACE("multi->control_count %" B_PRIu32 "\n", multi->control_count);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -564,7 +563,7 @@ get_mix(geode_controller *controller, multi_mix_value_info * mmvi)
|
||||
for (int32 i = 0; i < mmvi->item_count; i++) {
|
||||
uint32 id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= controller->multi->control_count) {
|
||||
dprintf("geode_get_mix : invalid control id requested : %li\n", id);
|
||||
dprintf("geode_get_mix : invalid control id requested : %" B_PRId32 "\n", id);
|
||||
continue;
|
||||
}
|
||||
multi_mixer_control *control = &controller->multi->controls[id];
|
||||
@ -603,7 +602,7 @@ set_mix(geode_controller *controller, multi_mix_value_info * mmvi)
|
||||
for (int32 i = 0; i < mmvi->item_count; i++) {
|
||||
uint32 id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= multi->control_count) {
|
||||
dprintf("geode_set_mix : invalid control id requested : %li\n", id);
|
||||
dprintf("geode_set_mix : invalid control id requested : %" B_PRId32 "\n", id);
|
||||
continue;
|
||||
}
|
||||
multi_mixer_control *control = &multi->controls[id];
|
||||
@ -613,7 +612,7 @@ set_mix(geode_controller *controller, multi_mix_value_info * mmvi)
|
||||
if (i+1<mmvi->item_count) {
|
||||
id = mmvi->values[i + 1].id - MULTI_CONTROL_FIRSTID;
|
||||
if (id < 0 || id >= multi->control_count) {
|
||||
dprintf("geode_set_mix : invalid control id requested : %li\n", id);
|
||||
dprintf("geode_set_mix : invalid control id requested : %" B_PRId32 "\n", id);
|
||||
} else {
|
||||
control2 = &multi->controls[id];
|
||||
if (control2->mix_control.master != control->mix_control.id)
|
||||
@ -662,10 +661,10 @@ set_mix(geode_controller *controller, multi_mix_value_info * mmvi)
|
||||
static status_t
|
||||
get_buffers(geode_controller* controller, multi_buffer_list* data)
|
||||
{
|
||||
TRACE("playback: %ld buffers, %ld channels, %ld samples\n",
|
||||
TRACE("playback: %" B_PRId32 " buffers, %" B_PRId32 " channels, %" B_PRIu32 " samples\n",
|
||||
data->request_playback_buffers, data->request_playback_channels,
|
||||
data->request_playback_buffer_size);
|
||||
TRACE("record: %ld buffers, %ld channels, %ld samples\n",
|
||||
TRACE("record: %" B_PRId32 " buffers, %" B_PRId32 " channels, %" B_PRIu32 " samples\n",
|
||||
data->request_record_buffers, data->request_record_channels,
|
||||
data->request_record_buffer_size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user