History

ALSA: bump uapi version numbers

Change SNDRV_PCM_VERSION, SNDRV_RAWMIDI_VERSION and SNDRV_TIMER_VERSION to indicate the addition of the time64 version of the mmap interface and these ioctl commands: SNDRV_PCM_IOCTL_SYNC SNDRV_RAWMIDI_IOCTL_STATUS SNDRV_PCM_IOCTL_STATUS SNDRV_PCM_IOCTL_STATUS_EXT SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_STATUS 32-bit applications built with 64-bit time_t require both the headers and the running kernel to support at least the new API version. When built with earlier kernel headers, some of these may not work correctly, so applications are encouraged to fail compilation like #if SNDRV_PCM_VERSION < SNDRV_PROTOCOL_VERSION(2, 0, 15) extern int __fail_build_for_time_64[sizeof(long) - sizeof(time_t)]; #endif or provide their own updated copy of the header file. At runtime, the interface is unchanged for 32-bit time_t, but new kernels are required to work with user compiled with 64-bit time_t. A runtime check can be used to detect old kernel versions and warn about those.

Arnd Bergmann committed 7 years ago

Commit 1cfaef91 parent 80fe7431 file · +3 −3Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/sound/asound.h+3−3
@@ -156,7 +156,7 @@ struct snd_hwdep_dsp_image { · 155 unmodified lines
156 * *156 * *
157 *****************************************************************************/157 *****************************************************************************/
158 158
159#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14)159#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15)
160 160
161typedef unsigned long snd_pcm_uframes_t;161typedef unsigned long snd_pcm_uframes_t;
162typedef signed long snd_pcm_sframes_t;162typedef signed long snd_pcm_sframes_t;
@@ -710,7 +710,7 @@ enum { · 547 unmodified lines
710 * Raw MIDI section - /dev/snd/midi??710 * Raw MIDI section - /dev/snd/midi??
711 */711 */
712 712
713#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0)713#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
714 714
715enum {715enum {
716 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,716 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
@@ -766,7 +766,7 @@ struct snd_rawmidi_status { · 49 unmodified lines
766 * Timer section - /dev/snd/timer766 * Timer section - /dev/snd/timer
767 */767 */
768 768
769#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)769#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
770 770
771enum {771enum {
772 SNDRV_TIMER_CLASS_NONE = -1,772 SNDRV_TIMER_CLASS_NONE = -1,