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
10451045 */
10461046 #define LOCL_STARTAUDIO 1
10471047
1048−#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
1048+#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
10491049 /*
10501050 * Some convenience macros to simplify programming of the
10511051 * /dev/sequencer interface
10521052 *
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.
10541064 */
10551065 #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
10561066
10571067 void seqbuf_dump(void); /* This function must be provided by programs */
10581068
1059−extern int OSS_init(int seqfd, int buflen);
1060−extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
1061−extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
1062−extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
1063−extern void OSS_patch_caching(int dev, int chn, int patch,
1064− int fd, unsigned char *buf, int buflen);
1065−extern void OSS_drum_caching(int dev, int chn, int patch,
1066− int fd, unsigned char *buf, int buflen);
1067−extern void OSS_write_patch(int fd, unsigned char *buf, int len);
1068−extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1069−
10701069 #define SEQ_PM_DEFINES int __foo_bar___
1071−#ifdef OSSLIB
1072−# define SEQ_USE_EXTBUF() \
1073− extern unsigned char *_seqbuf; \
1074− extern int _seqbuflen;extern int _seqbufptr
1075−# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
1076−# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
1077−# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
1078−# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
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
1070+
1071+#define SEQ_LOAD_GMINSTR(dev, instr)
1072+#define SEQ_LOAD_GMDRUM(dev, drum)
1073+
1074+#define _SEQ_EXTERN extern
1075+#define SEQ_USE_EXTBUF() \
1076+ _SEQ_EXTERN unsigned char _seqbuf[]; \
1077+ _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
10921078
10931079 #ifndef USE_SIMPLE_MACROS
10941080 /* Sample seqbuf_dump() implementation:
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 36 unmodified lines
11311117 */
11321118 #define _SEQ_NEEDBUF(len) /* empty */
11331119 #endif
1134−#endif /* !OSSLIB */
11351120
11361121 #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
11371122 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); · 77 unmodified lines
12151200 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
12161201
12171202 #define SEQ_SET_PATCH SEQ_PGM_CHANGE
1218−#ifdef OSSLIB
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) \
1203+#define SEQ_PGM_CHANGE(dev, chn, patch) \
12241204 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
1225−#endif
12261205
12271206 #define SEQ_CONTROL(dev, chn, controller, value) \
12281207 _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
13001279 /*
13011280 * Patch loading.
13021281 */
1303−#ifdef OSSLIB
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) \
1282+#define SEQ_WRPATCH(patchx, len) \
13101283 {if (_seqbufptr) SEQ_DUMPBUF();\
13111284 if (write(seqfd, (char*)(patchx), len)==-1) \
13121285 perror("Write patch: /dev/sequencer");}
1313−# define SEQ_WRPATCH2(patchx, len) \
1286+#define SEQ_WRPATCH2(patchx, len) \
13141287 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
1315−#endif
13161288
13171289 #endif
13181290 #endif