aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2012-10-27 15:55:27 -0400
committerTakashi Iwai <tiwai@suse.de>2012-10-28 04:52:37 -0400
commit9c7066aef4a5eb8e4063de28f06c508bf6f2963a (patch)
tree845a0f48868cf4b2917afe6582b1c4b15080d80b /sound/core
parent7dd7a2fd7eb147a610506f6c6f871c03908fc58a (diff)
ALSA: core: fix 64-bit SNDRV_PCM_IOCTL_STATUS ABI breakage
Commit 4eeaaeaea (ALSA: core: add hooks for audio timestamps) added the new audio_tstamp field to struct snd_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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_compat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
index af2a3fdb8828..af49721ba0e3 100644
--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -190,8 +190,9 @@ struct snd_pcm_status32 {
190 u32 avail_max; 190 u32 avail_max;
191 u32 overrange; 191 u32 overrange;
192 s32 suspended_state; 192 s32 suspended_state;
193 u32 reserved_alignment;
193 struct compat_timespec audio_tstamp; 194 struct compat_timespec audio_tstamp;
194 unsigned char reserved[60-sizeof(struct compat_timespec)]; 195 unsigned char reserved[56-sizeof(struct compat_timespec)];
195} __attribute__((packed)); 196} __attribute__((packed));
196 197
197 198