audio/ac97: Fix DEBUG build
- Fix VERSION macro in auich.h / auvia.h, used for log_create() in debug.c. - Add string.h to debug.c for strlen(). Change-Id: Iff4878763f49fe5b7e317c47e96ebd79f90725c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3629 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
111df1707b
commit
d271659f96
@@ -64,7 +64,7 @@
|
|||||||
#define AMD_AMD8111_AC97_DEVICE_ID 0x764d
|
#define AMD_AMD8111_AC97_DEVICE_ID 0x764d
|
||||||
#define AMD_AMD768_AC97_DEVICE_ID 0x7445
|
#define AMD_AMD768_AC97_DEVICE_ID 0x7445
|
||||||
|
|
||||||
#define VERSION "Version alpha 1, Copyright (c) 2003 Jérôme Duval, compiled on " ## __DATE__ ## " " ## __TIME__
|
#define VERSION "Version alpha 1, Copyright (c) 2003 Jérôme Duval, compiled on " __DATE__ " " __TIME__
|
||||||
#define DRIVER_NAME "auich"
|
#define DRIVER_NAME "auich"
|
||||||
#define FRIENDLY_NAME "Auich"
|
#define FRIENDLY_NAME "Auich"
|
||||||
#define AUTHOR "Jérôme Duval"
|
#define AUTHOR "Jérôme Duval"
|
||||||
|
|||||||
@@ -7,24 +7,24 @@
|
|||||||
* Copyright (c) 2002, Marcus Overhagen <[email protected]>
|
* Copyright (c) 2002, Marcus Overhagen <[email protected]>
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -32,8 +32,9 @@
|
|||||||
|
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <directories.h>
|
#include <directories.h>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Auvia BeOS Driver for Via VT82xx Southbridge audio
|
* Auvia BeOS Driver for Via VT82xx Southbridge audio
|
||||||
*
|
*
|
||||||
* Copyright (c) 2003, Jerome Duval ([email protected])
|
* Copyright (c) 2003, Jerome Duval ([email protected])
|
||||||
|
|
||||||
* This code is derived from software contributed to The NetBSD Foundation
|
* This code is derived from software contributed to The NetBSD Foundation
|
||||||
* by Tyler C. Sarna
|
* by Tyler C. Sarna
|
||||||
*
|
*
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DEV_PCI_AUVIA_H_
|
#ifndef _DEV_PCI_AUVIA_H_
|
||||||
#define _DEV_PCI_AUVIA_H_
|
#define _DEV_PCI_AUVIA_H_
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
#define VIATECH_8233_AC97_REV_8235 0x50
|
#define VIATECH_8233_AC97_REV_8235 0x50
|
||||||
#define VIATECH_8233_AC97_REV_8237 0x60 //this is the 5.1 Card in the new Athlon64 boards
|
#define VIATECH_8233_AC97_REV_8237 0x60 //this is the 5.1 Card in the new Athlon64 boards
|
||||||
|
|
||||||
#define VERSION "Version alpha 2, Copyright (c) 2003 Jérôme Duval, compiled on " ## __DATE__ ## " " ## __TIME__
|
#define VERSION "Version alpha 2, Copyright (c) 2003 Jérôme Duval, compiled on " __DATE__ " " __TIME__
|
||||||
#define DRIVER_NAME "auvia"
|
#define DRIVER_NAME "auvia"
|
||||||
#define FRIENDLY_NAME "Auvia"
|
#define FRIENDLY_NAME "Auvia"
|
||||||
#define FRIENDLY_NAME_686 FRIENDLY_NAME" 82C686"
|
#define FRIENDLY_NAME_686 FRIENDLY_NAME" 82C686"
|
||||||
@@ -91,7 +91,7 @@ typedef struct _auvia_mem {
|
|||||||
/*
|
/*
|
||||||
* Streams
|
* Streams
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _auvia_stream {
|
typedef struct _auvia_stream {
|
||||||
struct _auvia_dev *card;
|
struct _auvia_dev *card;
|
||||||
uint8 use;
|
uint8 use;
|
||||||
@@ -101,23 +101,23 @@ typedef struct _auvia_stream {
|
|||||||
uint8 channels;
|
uint8 channels;
|
||||||
uint32 bufframes;
|
uint32 bufframes;
|
||||||
uint8 bufcount;
|
uint8 bufcount;
|
||||||
|
|
||||||
uint32 base;
|
uint32 base;
|
||||||
|
|
||||||
LIST_ENTRY(_auvia_stream) next;
|
LIST_ENTRY(_auvia_stream) next;
|
||||||
|
|
||||||
void (*inth) (void *);
|
void (*inth) (void *);
|
||||||
void *inthparam;
|
void *inthparam;
|
||||||
|
|
||||||
void *dmaops_log_base;
|
void *dmaops_log_base;
|
||||||
void *dmaops_phy_base;
|
void *dmaops_phy_base;
|
||||||
area_id dmaops_area;
|
area_id dmaops_area;
|
||||||
|
|
||||||
auvia_mem *buffer;
|
auvia_mem *buffer;
|
||||||
uint16 blksize; /* in samples */
|
uint16 blksize; /* in samples */
|
||||||
uint16 trigblk; /* blk on which to trigger inth */
|
uint16 trigblk; /* blk on which to trigger inth */
|
||||||
uint16 blkmod; /* Modulo value to wrap trigblk */
|
uint16 blkmod; /* Modulo value to wrap trigblk */
|
||||||
|
|
||||||
/* multi_audio */
|
/* multi_audio */
|
||||||
volatile int64 frames_count; // for play or record
|
volatile int64 frames_count; // for play or record
|
||||||
volatile bigtime_t real_time; // for play or record
|
volatile bigtime_t real_time; // for play or record
|
||||||
@@ -134,22 +134,22 @@ typedef struct _auvia_dev {
|
|||||||
char name[DEVNAME]; /* used for resources */
|
char name[DEVNAME]; /* used for resources */
|
||||||
pci_info info;
|
pci_info info;
|
||||||
device_config config;
|
device_config config;
|
||||||
|
|
||||||
void *ptb_log_base;
|
void *ptb_log_base;
|
||||||
void *ptb_phy_base;
|
void *ptb_phy_base;
|
||||||
area_id ptb_area;
|
area_id ptb_area;
|
||||||
|
|
||||||
sem_id buffer_ready_sem;
|
sem_id buffer_ready_sem;
|
||||||
|
|
||||||
uint32 interrupt_mask;
|
uint32 interrupt_mask;
|
||||||
|
|
||||||
LIST_HEAD(, _auvia_stream) streams;
|
LIST_HEAD(, _auvia_stream) streams;
|
||||||
|
|
||||||
LIST_HEAD(, _auvia_mem) mems;
|
LIST_HEAD(, _auvia_mem) mems;
|
||||||
|
|
||||||
auvia_stream *pstream;
|
auvia_stream *pstream;
|
||||||
auvia_stream *rstream;
|
auvia_stream *rstream;
|
||||||
|
|
||||||
/* multi_audio */
|
/* multi_audio */
|
||||||
multi_dev multi;
|
multi_dev multi;
|
||||||
} auvia_dev;
|
} auvia_dev;
|
||||||
@@ -160,7 +160,7 @@ extern auvia_dev cards[NUM_CARDS];
|
|||||||
status_t auvia_stream_set_audioparms(auvia_stream *stream, uint8 channels,
|
status_t auvia_stream_set_audioparms(auvia_stream *stream, uint8 channels,
|
||||||
uint8 b16, uint32 sample_rate);
|
uint8 b16, uint32 sample_rate);
|
||||||
status_t auvia_stream_commit_parms(auvia_stream *stream);
|
status_t auvia_stream_commit_parms(auvia_stream *stream);
|
||||||
status_t auvia_stream_get_nth_buffer(auvia_stream *stream, uint8 chan, uint8 buf,
|
status_t auvia_stream_get_nth_buffer(auvia_stream *stream, uint8 chan, uint8 buf,
|
||||||
char** buffer, size_t *stride);
|
char** buffer, size_t *stride);
|
||||||
void auvia_stream_start(auvia_stream *stream, void (*inth) (void *), void *inthparam);
|
void auvia_stream_start(auvia_stream *stream, void (*inth) (void *), void *inthparam);
|
||||||
void auvia_stream_halt(auvia_stream *stream);
|
void auvia_stream_halt(auvia_stream *stream);
|
||||||
|
|||||||
@@ -7,24 +7,24 @@
|
|||||||
* Copyright (c) 2002, Marcus Overhagen <[email protected]>
|
* Copyright (c) 2002, Marcus Overhagen <[email protected]>
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* - Redistributions of source code must retain the above copyright notice,
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -32,8 +32,9 @@
|
|||||||
|
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <directories.h>
|
#include <directories.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user