History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: Only register AC97 bus if it's not done already ALSA: hda - Add snd_hda_multi_out_dig_cleanup() ALSA: hda - Add missing terminator in slave dig-out array ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model ALSA: hda - Register (new) devices at reconfig ALSA: mtpav - Fix initial value for input hwport ALSA: hda - add id for Intel IbexPeak integrated HDMI codec ALSA: hda - compute checksum in HDMI audio infoframe ALSA: hda - enable HDMI audio pin out at module loading time ALSA: hda - allow multi-channel HDMI audio playback when ELD is not present ASoC: Update SDP3430 machine driver for snd_soc_card ALSA: hda - Add quirk for Asus z37e (1043:8284) sound: Remove OSSlib stuff from linux/soundcard.h ASoC: WM8990: Fix kcontrol's private value use in put callback ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback

Linus Torvalds committed 17 years ago

Commit b51ebdc2 parents fb5ae64 99cbb8613 files · +112 −93Browse files

Showing the changes to include (1 of 13 files). Show all

Unified · Split

include/linux/soundcard.h+23−51
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table { · 1044 unmodified lines
1045 */1045 */
1046#define LOCL_STARTAUDIO 11046#define LOCL_STARTAUDIO 1
1047 1047
1048#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) 1048#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
1049/*1049/*
1050 * Some convenience macros to simplify programming of the1050 * Some convenience macros to simplify programming of the
1051 * /dev/sequencer interface1051 * /dev/sequencer interface
1052 *1052 *
1053 * These macros define the API which should be used when possible.1053 * This is a legacy interface for applications written against
1054 * the OSSlib-3.8 style interface. It is no longer possible
1055 * to actually link against OSSlib with this header, but we
1056 * still provide these macros for programs using them.
1057 *
1058 * If you want to use OSSlib, it is recommended that you get
1059 * the GPL version of OSS-4.x and build against that version
1060 * of the header.
1061 *
1062 * We redefine the extern keyword so that make headers_check
1063 * does not complain about SEQ_USE_EXTBUF.
1054 */1064 */
1055#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()1065#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
1056 1066
1057void seqbuf_dump(void); /* This function must be provided by programs */1067void seqbuf_dump(void); /* This function must be provided by programs */
1058 1068
1059extern int OSS_init(int seqfd, int buflen);
1060extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
1061extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
1062extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
1063extern void OSS_patch_caching(int dev, int chn, int patch,
1064 int fd, unsigned char *buf, int buflen);
1065extern void OSS_drum_caching(int dev, int chn, int patch,
1066 int fd, unsigned char *buf, int buflen);
1067extern void OSS_write_patch(int fd, unsigned char *buf, int len);
1068extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1069
1070#define SEQ_PM_DEFINES int __foo_bar___1069#define SEQ_PM_DEFINES int __foo_bar___
1071#ifdef OSSLIB1070
1072# define SEQ_USE_EXTBUF() \1071#define SEQ_LOAD_GMINSTR(dev, instr)
1073 extern unsigned char *_seqbuf; \1072#define SEQ_LOAD_GMDRUM(dev, drum)
1074 extern int _seqbuflen;extern int _seqbufptr1073
1075# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len1074#define _SEQ_EXTERN extern
1076# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)1075#define SEQ_USE_EXTBUF() \
1077# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)1076 _SEQ_EXTERN unsigned char _seqbuf[]; \
1078# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)1077 _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
1079
1080# define SEQ_LOAD_GMINSTR(dev, instr) \
1081 OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
1082# define SEQ_LOAD_GMDRUM(dev, drum) \
1083 OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
1084#else /* !OSSLIB */
1085
1086# define SEQ_LOAD_GMINSTR(dev, instr)
1087# define SEQ_LOAD_GMDRUM(dev, drum)
1088
1089# define SEQ_USE_EXTBUF() \
1090 extern unsigned char _seqbuf[]; \
1091 extern int _seqbuflen;extern int _seqbufptr
1092 1078
1093#ifndef USE_SIMPLE_MACROS1079#ifndef USE_SIMPLE_MACROS
1094/* Sample seqbuf_dump() implementation:1080/* Sample seqbuf_dump() implementation:
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 36 unmodified lines
1131 */1117 */
1132#define _SEQ_NEEDBUF(len) /* empty */1118#define _SEQ_NEEDBUF(len) /* empty */
1133#endif1119#endif
1134#endif /* !OSSLIB */
1135 1120
1136#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\1121#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
1137 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\1122 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 77 unmodified lines
1215 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)1200 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
1216 1201
1217#define SEQ_SET_PATCH SEQ_PGM_CHANGE1202#define SEQ_SET_PATCH SEQ_PGM_CHANGE
1218#ifdef OSSLIB1203#define SEQ_PGM_CHANGE(dev, chn, patch) \
1219# define SEQ_PGM_CHANGE(dev, chn, patch) \
1220 {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
1221 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
1222#else
1223# define SEQ_PGM_CHANGE(dev, chn, patch) \
1224 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)1204 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
1225#endif
1226 1205
1227#define SEQ_CONTROL(dev, chn, controller, value) \1206#define SEQ_CONTROL(dev, chn, controller, value) \
1228 _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)1207 _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); · 71 unmodified lines
1300/*1279/*
1301 * Patch loading.1280 * Patch loading.
1302 */1281 */
1303#ifdef OSSLIB1282#define SEQ_WRPATCH(patchx, len) \
1304# define SEQ_WRPATCH(patchx, len) \
1305 OSS_write_patch(seqfd, (char*)(patchx), len)
1306# define SEQ_WRPATCH2(patchx, len) \
1307 OSS_write_patch2(seqfd, (char*)(patchx), len)
1308#else
1309# define SEQ_WRPATCH(patchx, len) \
1310 {if (_seqbufptr) SEQ_DUMPBUF();\1283 {if (_seqbufptr) SEQ_DUMPBUF();\
1311 if (write(seqfd, (char*)(patchx), len)==-1) \1284 if (write(seqfd, (char*)(patchx), len)==-1) \
1312 perror("Write patch: /dev/sequencer");}1285 perror("Write patch: /dev/sequencer");}
1313# define SEQ_WRPATCH2(patchx, len) \1286#define SEQ_WRPATCH2(patchx, len) \
1314 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))1287 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
1315#endif
1316 1288
1317#endif1289#endif
1318#endif1290#endif