Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ebb88024
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ebb88024
编写于
2月 13, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/oss-header-fix' into for-linus
上级
d5b56233
43a99076
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
51 deletion
+23
-51
include/linux/soundcard.h
include/linux/soundcard.h
+23
-51
未找到文件。
include/linux/soundcard.h
浏览文件 @
ebb88024
...
...
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table {
*/
#define LOCL_STARTAUDIO 1
#if
(!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
#if
!defined(__KERNEL__) || defined(USE_SEQ_MACROS)
/*
* Some convenience macros to simplify programming of the
* /dev/sequencer interface
*
* These macros define the API which should be used when possible.
* This is a legacy interface for applications written against
* the OSSlib-3.8 style interface. It is no longer possible
* to actually link against OSSlib with this header, but we
* still provide these macros for programs using them.
*
* If you want to use OSSlib, it is recommended that you get
* the GPL version of OSS-4.x and build against that version
* of the header.
*
* We redefine the extern keyword so that make headers_check
* does not complain about SEQ_USE_EXTBUF.
*/
#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
void
seqbuf_dump
(
void
);
/* This function must be provided by programs */
extern
int
OSS_init
(
int
seqfd
,
int
buflen
);
extern
void
OSS_seqbuf_dump
(
int
fd
,
unsigned
char
*
buf
,
int
buflen
);
extern
void
OSS_seq_advbuf
(
int
len
,
int
fd
,
unsigned
char
*
buf
,
int
buflen
);
extern
void
OSS_seq_needbuf
(
int
len
,
int
fd
,
unsigned
char
*
buf
,
int
buflen
);
extern
void
OSS_patch_caching
(
int
dev
,
int
chn
,
int
patch
,
int
fd
,
unsigned
char
*
buf
,
int
buflen
);
extern
void
OSS_drum_caching
(
int
dev
,
int
chn
,
int
patch
,
int
fd
,
unsigned
char
*
buf
,
int
buflen
);
extern
void
OSS_write_patch
(
int
fd
,
unsigned
char
*
buf
,
int
len
);
extern
int
OSS_write_patch2
(
int
fd
,
unsigned
char
*
buf
,
int
len
);
#define SEQ_PM_DEFINES int __foo_bar___
#ifdef OSSLIB
# define SEQ_USE_EXTBUF() \
extern unsigned char *_seqbuf; \
extern int _seqbuflen;extern int _seqbufptr
# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
# define SEQ_LOAD_GMINSTR(dev, instr) \
OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
# define SEQ_LOAD_GMDRUM(dev, drum) \
OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
#else
/* !OSSLIB */
# define SEQ_LOAD_GMINSTR(dev, instr)
# define SEQ_LOAD_GMDRUM(dev, drum)
# define SEQ_USE_EXTBUF() \
extern unsigned char _seqbuf[]; \
extern int _seqbuflen;extern int _seqbufptr
#define SEQ_LOAD_GMINSTR(dev, instr)
#define SEQ_LOAD_GMDRUM(dev, drum)
#define _SEQ_EXTERN extern
#define SEQ_USE_EXTBUF() \
_SEQ_EXTERN unsigned char _seqbuf[]; \
_SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
#ifndef USE_SIMPLE_MACROS
/* Sample seqbuf_dump() implementation:
...
...
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
*/
#define _SEQ_NEEDBUF(len)
/* empty */
#endif
#endif
/* !OSSLIB */
#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
_seqbuf[_seqbufptr] = SEQ_EXTENDED;\
...
...
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
_CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
#define SEQ_SET_PATCH SEQ_PGM_CHANGE
#ifdef OSSLIB
# define SEQ_PGM_CHANGE(dev, chn, patch) \
{OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
_CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
#else
# define SEQ_PGM_CHANGE(dev, chn, patch) \
#define SEQ_PGM_CHANGE(dev, chn, patch) \
_CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
#endif
#define SEQ_CONTROL(dev, chn, controller, value) \
_CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
...
...
@@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
/*
* Patch loading.
*/
#ifdef OSSLIB
# define SEQ_WRPATCH(patchx, len) \
OSS_write_patch(seqfd, (char*)(patchx), len)
# define SEQ_WRPATCH2(patchx, len) \
OSS_write_patch2(seqfd, (char*)(patchx), len)
#else
# define SEQ_WRPATCH(patchx, len) \
#define SEQ_WRPATCH(patchx, len) \
{if (_seqbufptr) SEQ_DUMPBUF();\
if (write(seqfd, (char*)(patchx), len)==-1) \
perror("Write patch: /dev/sequencer");}
#
define SEQ_WRPATCH2(patchx, len) \
#define SEQ_WRPATCH2(patchx, len) \
(SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
#endif
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录