Commit 8086afae authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA update

  - compilation fixes without CONFIG_PROC_FS
parent f96f11d2
...@@ -1176,9 +1176,11 @@ static int snd_mixer_oss_notify_handler(snd_card_t * card, int free_flag) ...@@ -1176,9 +1176,11 @@ static int snd_mixer_oss_notify_handler(snd_card_t * card, int free_flag)
mixer->name[sizeof(mixer->name)-1] = 0; mixer->name[sizeof(mixer->name)-1] = 0;
} else } else
strcpy(mixer->name, name); strcpy(mixer->name, name);
#ifdef SNDRV_OSS_INFO_DEV_MIXERS
snd_oss_info_register(SNDRV_OSS_INFO_DEV_MIXERS, snd_oss_info_register(SNDRV_OSS_INFO_DEV_MIXERS,
card->number, card->number,
mixer->name); mixer->name);
#endif
for (idx = 0; idx < SNDRV_OSS_MAX_MIXERS; idx++) for (idx = 0; idx < SNDRV_OSS_MAX_MIXERS; idx++)
mixer->slots[idx].number = idx; mixer->slots[idx].number = idx;
card->mixer_oss = mixer; card->mixer_oss = mixer;
...@@ -1188,7 +1190,9 @@ static int snd_mixer_oss_notify_handler(snd_card_t * card, int free_flag) ...@@ -1188,7 +1190,9 @@ static int snd_mixer_oss_notify_handler(snd_card_t * card, int free_flag)
snd_mixer_oss_t *mixer = card->mixer_oss; snd_mixer_oss_t *mixer = card->mixer_oss;
if (mixer == NULL) if (mixer == NULL)
return 0; return 0;
#ifdef SNDRV_OSS_INFO_DEV_MIXERS
snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_MIXERS, mixer->card->number); snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_MIXERS, mixer->card->number);
#endif
snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER, mixer->card, 0); snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER, mixer->card, 0);
snd_mixer_oss_proc_done(mixer); snd_mixer_oss_proc_done(mixer);
return snd_mixer_oss_free1(mixer); return snd_mixer_oss_free1(mixer);
......
...@@ -2123,9 +2123,11 @@ static int snd_pcm_oss_register_minor(unsigned short native_minor, ...@@ -2123,9 +2123,11 @@ static int snd_pcm_oss_register_minor(unsigned short native_minor,
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count && pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count &&
!(pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX)); !(pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX));
sprintf(name, "%s%s", pcm->name, duplex ? " (DUPLEX)" : ""); sprintf(name, "%s%s", pcm->name, duplex ? " (DUPLEX)" : "");
#ifdef SNDRV_OSS_INFO_DEV_AUDIO
snd_oss_info_register(SNDRV_OSS_INFO_DEV_AUDIO, snd_oss_info_register(SNDRV_OSS_INFO_DEV_AUDIO,
pcm->card->number, pcm->card->number,
name); name);
#endif
pcm->oss.reg++; pcm->oss.reg++;
} }
if (snd_adsp_map[pcm->card->number] == pcm->device) { if (snd_adsp_map[pcm->card->number] == pcm->device) {
...@@ -2146,7 +2148,9 @@ static int snd_pcm_oss_unregister_minor(unsigned short native_minor, ...@@ -2146,7 +2148,9 @@ static int snd_pcm_oss_unregister_minor(unsigned short native_minor,
if (snd_dsp_map[pcm->card->number] == pcm->device) { if (snd_dsp_map[pcm->card->number] == pcm->device) {
snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM, snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
pcm->card, 0); pcm->card, 0);
#ifdef SNDRV_OSS_INFO_DEV_AUDIO
snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_AUDIO, pcm->card->number); snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_AUDIO, pcm->card->number);
#endif
} }
if (snd_adsp_map[pcm->card->number] == pcm->device) if (snd_adsp_map[pcm->card->number] == pcm->device)
snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM, snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
......
...@@ -2359,7 +2359,7 @@ static ssize_t snd_pcm_readv(struct file *file, const struct iovec *_vector, ...@@ -2359,7 +2359,7 @@ static ssize_t snd_pcm_readv(struct file *file, const struct iovec *_vector,
snd_pcm_runtime_t *runtime; snd_pcm_runtime_t *runtime;
snd_pcm_sframes_t result; snd_pcm_sframes_t result;
unsigned long i; unsigned long i;
void *bufs; void **bufs;
snd_pcm_uframes_t frames; snd_pcm_uframes_t frames;
pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO);
...@@ -2393,7 +2393,7 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector, ...@@ -2393,7 +2393,7 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector,
snd_pcm_runtime_t *runtime; snd_pcm_runtime_t *runtime;
snd_pcm_sframes_t result; snd_pcm_sframes_t result;
unsigned long i; unsigned long i;
void *bufs; void **bufs;
snd_pcm_uframes_t frames; snd_pcm_uframes_t frames;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
...@@ -2413,7 +2413,7 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector, ...@@ -2413,7 +2413,7 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector,
goto end; goto end;
} }
frames = bytes_to_samples(runtime, _vector->iov_len); frames = bytes_to_samples(runtime, _vector->iov_len);
bufs = kcalloc(sizeof(void *) * count, GFP_KERNEL); bufs = kmalloc(sizeof(void *) * count, GFP_KERNEL);
if (bufs == NULL) if (bufs == NULL)
return -ENOMEM; return -ENOMEM;
for (i = 0; i < count; ++i) for (i = 0; i < count; ++i)
......
...@@ -146,8 +146,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev) ...@@ -146,8 +146,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev)
debug_printk(("synth %s registered %d\n", rec->name, i)); debug_printk(("synth %s registered %d\n", rec->name, i));
spin_unlock_irqrestore(&register_lock, flags); spin_unlock_irqrestore(&register_lock, flags);
dev->driver_data = rec; dev->driver_data = rec;
#ifdef SNDRV_OSS_INFO_DEV_SYNTH
if (i < SNDRV_CARDS) if (i < SNDRV_CARDS)
snd_oss_info_register(SNDRV_OSS_INFO_DEV_SYNTH, i, rec->name); snd_oss_info_register(SNDRV_OSS_INFO_DEV_SYNTH, i, rec->name);
#endif
return 0; return 0;
} }
...@@ -178,8 +180,10 @@ snd_seq_oss_synth_unregister(snd_seq_device_t *dev) ...@@ -178,8 +180,10 @@ snd_seq_oss_synth_unregister(snd_seq_device_t *dev)
max_synth_devs = index + 1; max_synth_devs = index + 1;
} }
spin_unlock_irqrestore(&register_lock, flags); spin_unlock_irqrestore(&register_lock, flags);
#ifdef SNDRV_OSS_INFO_DEV_SYNTH
if (rec->seq_device < SNDRV_CARDS) if (rec->seq_device < SNDRV_CARDS)
snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_SYNTH, rec->seq_device); snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_SYNTH, rec->seq_device);
#endif
snd_use_lock_sync(&rec->use_lock); snd_use_lock_sync(&rec->use_lock);
kfree(rec); kfree(rec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment