diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2012-10-28 12:30:29 +0100 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2012-10-28 12:30:29 +0100 |
commit | 2b49df0c554cb9c7fc717dcf82d1b8f5310eef62 (patch) | |
tree | ff62c089e2d6f0a61d91542a188147f9270acab1 /include | |
parent | cf40ea169aad366b222283f431addafea6327149 (diff) |
pcm: fix 64-bit SNDRV_PCM_IOCTL_STATUS ABI breakage
Commit cf40ea169aad (pcm: support for audio timestamps) added the new
audio_tstamp field to struct sndrv_pcm_status. However, struct timespec
requires 64-bit alignment, so the 64-bit compiler would insert
32 bits of padding before this field, which broke SNDRV_PCM_IOCTL_STATUS
with error messages like this:
kernel: unknown ioctl = 0x80984120
To solve this, insert the padding explicitly so that it can be taken
into account when calculating the ABI structure size.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/asound.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 16d03e82..8fdad913 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -427,8 +427,9 @@ struct sndrv_pcm_status { sndrv_pcm_uframes_t avail_max; /* max frames available on hw since last status */ sndrv_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ int suspended_state; /* suspended stream state */ + u_int32_t reserved_alignment; /* must be filled with zero */ struct timespec audio_tstamp; /* from sample counter or wall clock */ - unsigned char reserved[60-sizeof(struct timespec)]; /* must be filled with zero */ + unsigned char reserved[56-sizeof(struct timespec)]; /* must be filled with zero */ }; struct sndrv_pcm_mmap_status { |