|
@@ -46,6 +46,13 @@
|
|
#include <sound/compress_offload.h>
|
|
#include <sound/compress_offload.h>
|
|
#include <sound/compress_driver.h>
|
|
#include <sound/compress_driver.h>
|
|
|
|
|
|
|
|
+/* struct snd_compr_codec_caps overflows the ioctl bit size for some
|
|
|
|
+ * architectures, so we need to disable the relevant ioctls.
|
|
|
|
+ */
|
|
|
|
+#if _IOC_SIZEBITS < 14
|
|
|
|
+#define COMPR_CODEC_CAPS_OVERFLOW
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* TODO:
|
|
/* TODO:
|
|
* - add substream support for multiple devices in case of
|
|
* - add substream support for multiple devices in case of
|
|
* SND_DYNAMIC_MINORS is not used
|
|
* SND_DYNAMIC_MINORS is not used
|
|
@@ -440,6 +447,7 @@ out:
|
|
return retval;
|
|
return retval;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
|
|
static int
|
|
static int
|
|
snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
|
|
snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
|
|
{
|
|
{
|
|
@@ -463,6 +471,7 @@ out:
|
|
kfree(caps);
|
|
kfree(caps);
|
|
return retval;
|
|
return retval;
|
|
}
|
|
}
|
|
|
|
+#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
|
|
|
|
|
|
/* revisit this with snd_pcm_preallocate_xxx */
|
|
/* revisit this with snd_pcm_preallocate_xxx */
|
|
static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
|
|
static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
|
|
@@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
|
|
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
|
|
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
|
|
retval = snd_compr_get_caps(stream, arg);
|
|
retval = snd_compr_get_caps(stream, arg);
|
|
break;
|
|
break;
|
|
|
|
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
|
|
case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
|
|
case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
|
|
retval = snd_compr_get_codec_caps(stream, arg);
|
|
retval = snd_compr_get_codec_caps(stream, arg);
|
|
break;
|
|
break;
|
|
|
|
+#endif
|
|
case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
|
|
case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
|
|
retval = snd_compr_set_params(stream, arg);
|
|
retval = snd_compr_set_params(stream, arg);
|
|
break;
|
|
break;
|