3077 |
/* |
/* |
3078 |
* gameport interface |
* gameport interface |
3079 |
*/ |
*/ |
3080 |
#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) |
|
3081 |
|
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
3082 |
|
|
3083 |
typedef struct snd_trident_gameport { |
typedef struct snd_trident_gameport { |
3084 |
struct gameport info; |
struct gameport info; |
3174 |
*/ |
*/ |
3175 |
inline static void do_delay(trident_t *chip) |
inline static void do_delay(trident_t *chip) |
3176 |
{ |
{ |
|
#ifdef CONFIG_PM |
|
|
if (chip->in_suspend) { |
|
|
mdelay((1000 + HZ - 1) / HZ); |
|
|
return; |
|
|
} |
|
|
#endif |
|
3177 |
set_current_state(TASK_UNINTERRUPTIBLE); |
set_current_state(TASK_UNINTERRUPTIBLE); |
3178 |
schedule_timeout(1); |
schedule_timeout(1); |
3179 |
} |
} |
3268 |
snd_iprintf(buffer, "Memory Free : %d\n", snd_util_mem_avail(trident->tlb.memhdr)); |
snd_iprintf(buffer, "Memory Free : %d\n", snd_util_mem_avail(trident->tlb.memhdr)); |
3269 |
} |
} |
3270 |
} |
} |
3271 |
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
3272 |
snd_iprintf(buffer,"\nWavetable Synth\n"); |
snd_iprintf(buffer,"\nWavetable Synth\n"); |
3273 |
snd_iprintf(buffer, "Memory Maximum : %d\n", trident->synth.max_size); |
snd_iprintf(buffer, "Memory Maximum : %d\n", trident->synth.max_size); |
3274 |
snd_iprintf(buffer, "Memory Used : %d\n", trident->synth.current_size); |
snd_iprintf(buffer, "Memory Used : %d\n", trident->synth.current_size); |
3631 |
|
|
3632 |
int snd_trident_free(trident_t *trident) |
int snd_trident_free(trident_t *trident) |
3633 |
{ |
{ |
3634 |
#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) |
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
3635 |
if (trident->gameport) { |
if (trident->gameport) { |
3636 |
gameport_unregister_port(&trident->gameport->info); |
gameport_unregister_port(&trident->gameport->info); |
3637 |
kfree(trident->gameport); |
kfree(trident->gameport); |
3791 |
---------------------------------------------------------------------------*/ |
---------------------------------------------------------------------------*/ |
3792 |
int snd_trident_attach_synthesizer(trident_t *trident) |
int snd_trident_attach_synthesizer(trident_t *trident) |
3793 |
{ |
{ |
3794 |
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
3795 |
if (snd_seq_device_new(trident->card, 1, SNDRV_SEQ_DEV_ID_TRIDENT, |
if (snd_seq_device_new(trident->card, 1, SNDRV_SEQ_DEV_ID_TRIDENT, |
3796 |
sizeof(trident_t*), &trident->seq_dev) >= 0) { |
sizeof(trident_t*), &trident->seq_dev) >= 0) { |
3797 |
strcpy(trident->seq_dev->name, "4DWave"); |
strcpy(trident->seq_dev->name, "4DWave"); |
3803 |
|
|
3804 |
int snd_trident_detach_synthesizer(trident_t *trident) |
int snd_trident_detach_synthesizer(trident_t *trident) |
3805 |
{ |
{ |
3806 |
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
3807 |
if (trident->seq_dev) { |
if (trident->seq_dev) { |
3808 |
snd_device_free(trident->card, trident->seq_dev); |
snd_device_free(trident->card, trident->seq_dev); |
3809 |
trident->seq_dev = NULL; |
trident->seq_dev = NULL; |