summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-12-01 12:51:58 +0300
committerJaroslav Kysela <perex@suse.cz>2006-01-03 14:30:10 +0300
commit59d48582508c6e3ed6f60bdd7d13e3e2893416b4 (patch)
treee52ecc173a4f44d1a225e6a4abc1ad842fd38deb /sound/core/pcm_native.c
parentadf1b3d25e50dbab48fdd21006bea2dd5a4cb3a8 (diff)
downloadlinux-59d48582508c6e3ed6f60bdd7d13e3e2893416b4.tar.xz
[ALSA] pcm - Make the support of old API selectable
Modules: ALSA Core,PCM Midlevel Make the support of old API selectable via config option. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 9010306bcead..f3d5de7b55ac 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -55,6 +55,7 @@ struct snd_pcm_hw_params_old {
unsigned char reserved[64];
};
+#ifdef CONFIG_SND_SUPPORT_OLD_API
#define SNDRV_PCM_IOCTL_HW_REFINE_OLD _IOWR('A', 0x10, struct snd_pcm_hw_params_old)
#define SNDRV_PCM_IOCTL_HW_PARAMS_OLD _IOWR('A', 0x11, struct snd_pcm_hw_params_old)
@@ -62,6 +63,7 @@ static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params_old __user * _oparams);
static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params_old __user * _oparams);
+#endif
static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream);
/*
@@ -2527,10 +2529,12 @@ static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream,
return snd_pcm_delay(substream, arg);
case SNDRV_PCM_IOCTL_SYNC_PTR:
return snd_pcm_sync_ptr(substream, arg);
+#ifdef CONFIG_SND_SUPPORT_OLD_API
case SNDRV_PCM_IOCTL_HW_REFINE_OLD:
return snd_pcm_hw_refine_old_user(substream, arg);
case SNDRV_PCM_IOCTL_HW_PARAMS_OLD:
return snd_pcm_hw_params_old_user(substream, arg);
+#endif
case SNDRV_PCM_IOCTL_DRAIN:
return snd_pcm_drain(substream);
case SNDRV_PCM_IOCTL_DROP:
@@ -3270,6 +3274,7 @@ static int snd_pcm_fasync(int fd, struct file * file, int on)
* To be removed helpers to keep binary compatibility
*/
+#ifdef CONFIG_SND_SUPPORT_OLD_API
#define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
#define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
@@ -3379,6 +3384,7 @@ out:
kfree(oparams);
return err;
}
+#endif /* CONFIG_SND_SUPPORT_OLD_API */
/*
* Register section