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
156156 * *
157157 *****************************************************************************/
158158
159−#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14)
159+#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15)
160160
161161 typedef unsigned long snd_pcm_uframes_t;
162162 typedef signed long snd_pcm_sframes_t;
@@ -710,7 +710,7 @@ enum { · 547 unmodified lines
710710 * Raw MIDI section - /dev/snd/midi??
711711 */
712712
713−#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0)
713+#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
714714
715715 enum {
716716 SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
@@ -766,7 +766,7 @@ struct snd_rawmidi_status { · 49 unmodified lines
766766 * Timer section - /dev/snd/timer
767767 */
768768
769−#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
769+#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
770770
771771 enum {
772772 SNDRV_TIMER_CLASS_NONE = -1,