Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16144
b: refs/heads/master
c: 59d4858
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 500ad26 commit 0e2d421
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adf1b3d25e50dbab48fdd21006bea2dd5a4cb3a8
refs/heads/master: 59d48582508c6e3ed6f60bdd7d13e3e2893416b4
8 changes: 8 additions & 0 deletions trunk/sound/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ config SND_DYNAMIC_MINORS

If you are unsure about this, say N here.

config SND_SUPPORT_OLD_API
bool "Support old ALSA API"
depends on SND
default y
help
Say Y here to support the obsolete ALSA PCM API (ver.0.9.0 rc3
or older).

config SND_VERBOSE_PRINTK
bool "Verbose printk"
depends on SND
Expand Down
6 changes: 6 additions & 0 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ 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)

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);

/*
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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))

Expand Down Expand Up @@ -3379,6 +3384,7 @@ static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
kfree(oparams);
return err;
}
#endif /* CONFIG_SND_SUPPORT_OLD_API */

/*
* Register section
Expand Down

0 comments on commit 0e2d421

Please sign in to comment.