diff options
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gus_io.c | 229 | ||||
-rw-r--r-- | sound/isa/gus/gus_main.c | 30 | ||||
-rw-r--r-- | sound/isa/gus/gus_mixer.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_reset.c | 16 | ||||
-rw-r--r-- | sound/isa/gus/gus_timer.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gus_uart.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gusextreme.c | 8 | ||||
-rw-r--r-- | sound/isa/gus/gusmax.c | 16 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 34 |
10 files changed, 44 insertions, 299 deletions
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c index 1dc9e0edb3d9..f167eb8d516b 100644 --- a/sound/isa/gus/gus_io.c +++ b/sound/isa/gus/gus_io.c @@ -228,49 +228,6 @@ unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg) return res; } -#if 0 - -void snd_gf1_i_adlib_write(struct snd_gus_card * gus, - unsigned char reg, - unsigned char data) -{ - unsigned long flags; - - spin_lock_irqsave(&gus->reg_lock, flags); - __snd_gf1_adlib_write(gus, reg, data); - spin_unlock_irqrestore(&gus->reg_lock, flags); -} - -void snd_gf1_i_write_addr(struct snd_gus_card * gus, unsigned char reg, - unsigned int addr, short w_16bit) -{ - unsigned long flags; - - spin_lock_irqsave(&gus->reg_lock, flags); - __snd_gf1_write_addr(gus, reg, addr, w_16bit); - spin_unlock_irqrestore(&gus->reg_lock, flags); -} - -#endif /* 0 */ - -#ifdef CONFIG_SND_DEBUG -static unsigned int snd_gf1_i_read_addr(struct snd_gus_card * gus, - unsigned char reg, short w_16bit) -{ - unsigned int res; - unsigned long flags; - - spin_lock_irqsave(&gus->reg_lock, flags); - res = __snd_gf1_read_addr(gus, reg, w_16bit); - spin_unlock_irqrestore(&gus->reg_lock, flags); - return res; -} -#endif - -/* - - */ - void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr) { outb(0x43, gus->gf1.reg_regsel); @@ -418,189 +375,3 @@ void snd_gf1_select_active_voices(struct snd_gus_card * gus) udelay(100); } } - -#ifdef CONFIG_SND_DEBUG - -void snd_gf1_print_voice_registers(struct snd_gus_card * gus) -{ - unsigned char mode; - int voice, ctrl; - - voice = gus->gf1.active_voice; - dev_info(gus->card->dev, - " -%i- GF1 voice ctrl, ramp ctrl = 0x%x, 0x%x\n", - voice, ctrl = snd_gf1_i_read8(gus, 0), snd_gf1_i_read8(gus, 0x0d)); - dev_info(gus->card->dev, - " -%i- GF1 frequency = 0x%x\n", - voice, snd_gf1_i_read16(gus, 1)); - dev_info(gus->card->dev, - " -%i- GF1 loop start, end = 0x%x (0x%x), 0x%x (0x%x)\n", - voice, snd_gf1_i_read_addr(gus, 2, ctrl & 4), - snd_gf1_i_read_addr(gus, 2, (ctrl & 4) ^ 4), - snd_gf1_i_read_addr(gus, 4, ctrl & 4), - snd_gf1_i_read_addr(gus, 4, (ctrl & 4) ^ 4)); - dev_info(gus->card->dev, - " -%i- GF1 ramp start, end, rate = 0x%x, 0x%x, 0x%x\n", - voice, snd_gf1_i_read8(gus, 7), snd_gf1_i_read8(gus, 8), - snd_gf1_i_read8(gus, 6)); - dev_info(gus->card->dev, - " -%i- GF1 volume = 0x%x\n", - voice, snd_gf1_i_read16(gus, 9)); - dev_info(gus->card->dev, - " -%i- GF1 position = 0x%x (0x%x)\n", - voice, snd_gf1_i_read_addr(gus, 0x0a, ctrl & 4), - snd_gf1_i_read_addr(gus, 0x0a, (ctrl & 4) ^ 4)); - if (gus->interwave && snd_gf1_i_read8(gus, 0x19) & 0x01) { /* enhanced mode */ - mode = snd_gf1_i_read8(gus, 0x15); - dev_info(gus->card->dev, - " -%i- GFA1 mode = 0x%x\n", - voice, mode); - if (mode & 0x01) { /* Effect processor */ - dev_info(gus->card->dev, - " -%i- GFA1 effect address = 0x%x\n", - voice, snd_gf1_i_read_addr(gus, 0x11, ctrl & 4)); - dev_info(gus->card->dev, - " -%i- GFA1 effect volume = 0x%x\n", - voice, snd_gf1_i_read16(gus, 0x16)); - dev_info(gus->card->dev, - " -%i- GFA1 effect volume final = 0x%x\n", - voice, snd_gf1_i_read16(gus, 0x1d)); - dev_info(gus->card->dev, - " -%i- GFA1 effect accumulator = 0x%x\n", - voice, snd_gf1_i_read8(gus, 0x14)); - } - if (mode & 0x20) { - dev_info(gus->card->dev, - " -%i- GFA1 left offset = 0x%x (%i)\n", - voice, snd_gf1_i_read16(gus, 0x13), - snd_gf1_i_read16(gus, 0x13) >> 4); - dev_info(gus->card->dev, - " -%i- GFA1 left offset final = 0x%x (%i)\n", - voice, snd_gf1_i_read16(gus, 0x1c), - snd_gf1_i_read16(gus, 0x1c) >> 4); - dev_info(gus->card->dev, - " -%i- GFA1 right offset = 0x%x (%i)\n", - voice, snd_gf1_i_read16(gus, 0x0c), - snd_gf1_i_read16(gus, 0x0c) >> 4); - dev_info(gus->card->dev, - " -%i- GFA1 right offset final = 0x%x (%i)\n", - voice, snd_gf1_i_read16(gus, 0x1b), - snd_gf1_i_read16(gus, 0x1b) >> 4); - } else - dev_info(gus->card->dev, - " -%i- GF1 pan = 0x%x\n", - voice, snd_gf1_i_read8(gus, 0x0c)); - } else - dev_info(gus->card->dev, - " -%i- GF1 pan = 0x%x\n", - voice, snd_gf1_i_read8(gus, 0x0c)); -} - -#if 0 - -void snd_gf1_print_global_registers(struct snd_gus_card * gus) -{ - unsigned char global_mode = 0x00; - - dev_info(gus->card->dev, - " -G- GF1 active voices = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_ACTIVE_VOICES)); - if (gus->interwave) { - global_mode = snd_gf1_i_read8(gus, SNDRV_GF1_GB_GLOBAL_MODE); - dev_info(gus->card->dev, - " -G- GF1 global mode = 0x%x\n", - global_mode); - } - if (global_mode & 0x02) /* LFO enabled? */ - dev_info(gus->card->dev, - " -G- GF1 LFO base = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_LFO_BASE)); - dev_info(gus->card->dev, - " -G- GF1 voices IRQ read = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_VOICES_IRQ_READ)); - dev_info(gus->card->dev, - " -G- GF1 DRAM DMA control = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL)); - dev_info(gus->card->dev, - " -G- GF1 DRAM DMA high/low = 0x%x/0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_DMA_HIGH), - snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_DMA_LOW)); - dev_info(gus->card->dev, - " -G- GF1 DRAM IO high/low = 0x%x/0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_DRAM_IO_HIGH), - snd_gf1_i_read16(gus, SNDRV_GF1_GW_DRAM_IO_LOW)); - if (!gus->interwave) - dev_info(gus->card->dev, - " -G- GF1 record DMA control = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL)); - dev_info(gus->card->dev, - " -G- GF1 DRAM IO 16 = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_DRAM_IO16)); - if (gus->gf1.enh_mode) { - dev_info(gus->card->dev, - " -G- GFA1 memory config = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG)); - dev_info(gus->card->dev, - " -G- GFA1 memory control = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_MEMORY_CONTROL)); - dev_info(gus->card->dev, - " -G- GFA1 FIFO record base = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_RECORD_BASE_ADDR)); - dev_info(gus->card->dev, - " -G- GFA1 FIFO playback base = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_FIFO_PLAY_BASE_ADDR)); - dev_info(gus->card->dev, - " -G- GFA1 interleave control = 0x%x\n", - snd_gf1_i_look16(gus, SNDRV_GF1_GW_INTERLEAVE)); - } -} - -void snd_gf1_print_setup_registers(struct snd_gus_card * gus) -{ - dev_info(gus->card->dev, - " -S- mix control = 0x%x\n", - inb(GUSP(gus, MIXCNTRLREG))); - dev_info(gus->card->dev, - " -S- IRQ status = 0x%x\n", - inb(GUSP(gus, IRQSTAT))); - dev_info(gus->card->dev, - " -S- timer control = 0x%x\n", - inb(GUSP(gus, TIMERCNTRL))); - dev_info(gus->card->dev, - " -S- timer data = 0x%x\n", - inb(GUSP(gus, TIMERDATA))); - dev_info(gus->card->dev, - " -S- status read = 0x%x\n", - inb(GUSP(gus, REGCNTRLS))); - dev_info(gus->card->dev, - " -S- Sound Blaster control = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL)); - dev_info(gus->card->dev, - " -S- AdLib timer 1/2 = 0x%x/0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1), - snd_gf1_i_look8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2)); - dev_info(gus->card->dev, - " -S- reset = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)); - if (gus->interwave) { - dev_info(gus->card->dev, - " -S- compatibility = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_COMPATIBILITY)); - dev_info(gus->card->dev, - " -S- decode control = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_DECODE_CONTROL)); - dev_info(gus->card->dev, - " -S- version number = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_VERSION_NUMBER)); - dev_info(gus->card->dev, - " -S- MPU-401 emul. control A/B = 0x%x/0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_A), - snd_gf1_i_look8(gus, SNDRV_GF1_GB_MPU401_CONTROL_B)); - dev_info(gus->card->dev, - " -S- emulation IRQ = 0x%x\n", - snd_gf1_i_look8(gus, SNDRV_GF1_GB_EMULATION_IRQ)); - } -} -#endif /* 0 */ - -#endif diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 51ce405eba7a..873ef4046cd6 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -22,18 +22,6 @@ MODULE_LICENSE("GPL"); static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches); -int snd_gus_use_inc(struct snd_gus_card * gus) -{ - if (!try_module_get(gus->card->module)) - return 0; - return 1; -} - -void snd_gus_use_dec(struct snd_gus_card * gus) -{ - module_put(gus->card->module); -} - static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; @@ -360,8 +348,8 @@ static int snd_gus_check_version(struct snd_gus_card * gus) rev = inb(GUSP(gus, BOARDVERSION)); spin_unlock_irqrestore(&gus->reg_lock, flags); dev_dbg(card->dev, "GF1 [0x%lx] init - val = 0x%x, rev = 0x%x\n", gus->gf1.port, val, rev); - strcpy(card->driver, "GUS"); - strcpy(card->longname, "Gravis UltraSound Classic (2.4)"); + strscpy(card->driver, "GUS"); + strscpy(card->longname, "Gravis UltraSound Classic (2.4)"); if ((val != 255 && (val & 0x06)) || (rev >= 5 && rev != 255)) { if (rev >= 5 && rev <= 9) { gus->ics_flag = 1; @@ -372,16 +360,16 @@ static int snd_gus_check_version(struct snd_gus_card * gus) } if (rev >= 10 && rev != 255) { if (rev >= 10 && rev <= 11) { - strcpy(card->driver, "GUS MAX"); - strcpy(card->longname, "Gravis UltraSound MAX"); + strscpy(card->driver, "GUS MAX"); + strscpy(card->longname, "Gravis UltraSound MAX"); gus->max_flag = 1; } else if (rev == 0x30) { - strcpy(card->driver, "GUS ACE"); - strcpy(card->longname, "Gravis UltraSound Ace"); + strscpy(card->driver, "GUS ACE"); + strscpy(card->longname, "Gravis UltraSound Ace"); gus->ace_flag = 1; } else if (rev == 0x50) { - strcpy(card->driver, "GUS Extreme"); - strcpy(card->longname, "Gravis UltraSound Extreme"); + strscpy(card->driver, "GUS Extreme"); + strscpy(card->longname, "Gravis UltraSound Extreme"); gus->ess_flag = 1; } else { dev_err(card->dev, @@ -443,8 +431,6 @@ EXPORT_SYMBOL(snd_gf1_new_mixer); /* gus_pcm.c */ EXPORT_SYMBOL(snd_gf1_pcm_new); /* gus.c */ -EXPORT_SYMBOL(snd_gus_use_inc); -EXPORT_SYMBOL(snd_gus_use_dec); EXPORT_SYMBOL(snd_gus_create); EXPORT_SYMBOL(snd_gus_initialize); /* gus_irq.c */ diff --git a/sound/isa/gus/gus_mixer.c b/sound/isa/gus/gus_mixer.c index 03f9cfcbf601..60c3a8219770 100644 --- a/sound/isa/gus/gus_mixer.c +++ b/sound/isa/gus/gus_mixer.c @@ -152,7 +152,7 @@ int snd_gf1_new_mixer(struct snd_gus_card * gus) if (gus->ics_flag) snd_component_add(card, "ICS2101"); if (card->mixername[0] == '\0') { - strcpy(card->mixername, gus->ics_flag ? "GF1,ICS2101" : "GF1"); + strscpy(card->mixername, gus->ics_flag ? "GF1,ICS2101" : "GF1"); } else { if (gus->ics_flag) strcat(card->mixername, ",ICS2101"); diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 16f9bbb43a54..8b9b7b8d92b2 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -851,7 +851,7 @@ int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index) SNDRV_DMA_TYPE_DEV, card->dev, 64*1024, gus->gf1.dma2 > 3 ? 128*1024 : 64*1024); } - strcpy(pcm->name, pcm->id); + strscpy(pcm->name, pcm->id); if (gus->interwave) { sprintf(pcm->name + strlen(pcm->name), " rev %c", gus->revision + 'A'); } diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c index ac5da1281042..326bc6028885 100644 --- a/sound/isa/gus/gus_reset.c +++ b/sound/isa/gus/gus_reset.c @@ -141,10 +141,6 @@ void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice) if (gus->gf1.enh_mode) snd_gf1_write8(gus, SNDRV_GF1_VB_ACCUMULATOR, 0); spin_unlock_irqrestore(&gus->reg_lock, flags); -#if 0 - snd_gf1_lfo_shutdown(gus, voice, ULTRA_LFO_VIBRATO); - snd_gf1_lfo_shutdown(gus, voice, ULTRA_LFO_TREMOLO); -#endif } static void snd_gf1_clear_voices(struct snd_gus_card * gus, unsigned short v_min, @@ -182,10 +178,6 @@ static void snd_gf1_clear_voices(struct snd_gus_card * gus, unsigned short v_min snd_gf1_write16(gus, SNDRV_GF1_VW_EFFECT_VOLUME_FINAL, 0); } spin_unlock_irqrestore(&gus->reg_lock, flags); -#if 0 - snd_gf1_lfo_shutdown(gus, i, ULTRA_LFO_VIBRATO); - snd_gf1_lfo_shutdown(gus, i, ULTRA_LFO_TREMOLO); -#endif } } @@ -335,9 +327,7 @@ int snd_gf1_start(struct snd_gus_card * gus) } else { gus->gf1.sw_lfo = 1; } -#if 0 - snd_gf1_lfo_init(gus); -#endif + if (gus->gf1.memory > 0) for (i = 0; i < 4; i++) snd_gf1_poke(gus, gus->gf1.default_voice_address + i, 0); @@ -391,8 +381,6 @@ int snd_gf1_stop(struct snd_gus_card * gus) snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* disable IRQ & DAC */ snd_gf1_timers_done(gus); snd_gf1_mem_done(gus); -#if 0 - snd_gf1_lfo_done(gus); -#endif + return 0; } diff --git a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c index 047ddbc6192f..7267fb5bf8e5 100644 --- a/sound/isa/gus/gus_timer.c +++ b/sound/isa/gus/gus_timer.c @@ -156,7 +156,7 @@ void snd_gf1_timers_init(struct snd_gus_card * gus) tid.subdevice = 0; if (snd_timer_new(gus->card, "GF1 timer", &tid, &timer) >= 0) { - strcpy(timer->name, "GF1 timer #1"); + strscpy(timer->name, "GF1 timer #1"); timer->private_data = gus; timer->private_free = snd_gf1_timer1_free; timer->hw = snd_gf1_timer1; @@ -166,7 +166,7 @@ void snd_gf1_timers_init(struct snd_gus_card * gus) tid.device++; if (snd_timer_new(gus->card, "GF1 timer", &tid, &timer) >= 0) { - strcpy(timer->name, "GF1 timer #2"); + strscpy(timer->name, "GF1 timer #2"); timer->private_data = gus; timer->private_free = snd_gf1_timer2_free; timer->hw = snd_gf1_timer2; diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index 08276509447f..e207f274f240 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c @@ -236,7 +236,7 @@ int snd_gf1_rawmidi_new(struct snd_gus_card *gus, int device) err = snd_rawmidi_new(gus->card, "GF1", device, 1, 1, &rmidi); if (err < 0) return err; - strcpy(rmidi->name, gus->interwave ? "AMD InterWave" : "GF1"); + strscpy(rmidi->name, gus->interwave ? "AMD InterWave" : "GF1"); snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_gf1_uart_output); snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_gf1_uart_input); rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX; diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 6eab95bd49c1..28827a2e6cbd 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c @@ -204,15 +204,15 @@ static int snd_gusextreme_mixer(struct snd_card *card) id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; /* reassign AUX to SYNTHESIZER */ - strcpy(id1.name, "Aux Playback Volume"); - strcpy(id2.name, "Synth Playback Volume"); + strscpy(id1.name, "Aux Playback Volume"); + strscpy(id2.name, "Synth Playback Volume"); error = snd_ctl_rename_id(card, &id1, &id2); if (error < 0) return error; /* reassign Master Playback Switch to Synth Playback Switch */ - strcpy(id1.name, "Master Playback Switch"); - strcpy(id2.name, "Synth Playback Switch"); + strscpy(id1.name, "Master Playback Switch"); + strscpy(id2.name, "Synth Playback Switch"); error = snd_ctl_rename_id(card, &id1, &id2); if (error < 0) return error; diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index 445fd2fb50f1..b572411c4422 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c @@ -134,24 +134,24 @@ static int snd_gusmax_mixer(struct snd_wss *chip) memset(&id2, 0, sizeof(id2)); id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; /* reassign AUXA to SYNTHESIZER */ - strcpy(id1.name, "Aux Playback Switch"); - strcpy(id2.name, "Synth Playback Switch"); + strscpy(id1.name, "Aux Playback Switch"); + strscpy(id2.name, "Synth Playback Switch"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; - strcpy(id1.name, "Aux Playback Volume"); - strcpy(id2.name, "Synth Playback Volume"); + strscpy(id1.name, "Aux Playback Volume"); + strscpy(id2.name, "Synth Playback Volume"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; /* reassign AUXB to CD */ - strcpy(id1.name, "Aux Playback Switch"); id1.index = 1; - strcpy(id2.name, "CD Playback Switch"); + strscpy(id1.name, "Aux Playback Switch"); id1.index = 1; + strscpy(id2.name, "CD Playback Switch"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; - strcpy(id1.name, "Aux Playback Volume"); - strcpy(id2.name, "CD Playback Volume"); + strscpy(id1.name, "Aux Playback Volume"); + strscpy(id2.name, "CD Playback Volume"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 18a98123e286..0e0bcd85a648 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -271,7 +271,7 @@ static int snd_interwave_detect(struct snd_interwave *iwcard, dev_dbg(gus->card->dev, "[0x%lx] InterWave check - passed\n", gus->gf1.port); gus->interwave = 1; - strcpy(gus->card->shortname, "AMD InterWave"); + strscpy(gus->card->shortname, "AMD InterWave"); gus->revision = rev1 >> 4; #ifndef SNDRV_STB return 0; /* ok.. We have an InterWave board */ @@ -500,11 +500,11 @@ static int snd_interwave_mixer(struct snd_wss *chip) id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; #if 0 /* remove mono microphone controls */ - strcpy(id1.name, "Mic Playback Switch"); + strscpy(id1.name, "Mic Playback Switch"); err = snd_ctl_remove_id(card, &id1); if (err < 0) return err; - strcpy(id1.name, "Mic Playback Volume"); + strscpy(id1.name, "Mic Playback Volume"); err = snd_ctl_remove_id(card, &id1); if (err < 0) return err; @@ -520,24 +520,24 @@ static int snd_interwave_mixer(struct snd_wss *chip) snd_wss_out(chip, CS4231_LEFT_MIC_INPUT, 0x9f); snd_wss_out(chip, CS4231_RIGHT_MIC_INPUT, 0x9f); /* reassign AUXA to SYNTHESIZER */ - strcpy(id1.name, "Aux Playback Switch"); - strcpy(id2.name, "Synth Playback Switch"); + strscpy(id1.name, "Aux Playback Switch"); + strscpy(id2.name, "Synth Playback Switch"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; - strcpy(id1.name, "Aux Playback Volume"); - strcpy(id2.name, "Synth Playback Volume"); + strscpy(id1.name, "Aux Playback Volume"); + strscpy(id2.name, "Synth Playback Volume"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; /* reassign AUXB to CD */ - strcpy(id1.name, "Aux Playback Switch"); id1.index = 1; - strcpy(id2.name, "CD Playback Switch"); + strscpy(id1.name, "Aux Playback Switch"); id1.index = 1; + strscpy(id2.name, "CD Playback Switch"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; - strcpy(id1.name, "Aux Playback Volume"); - strcpy(id2.name, "CD Playback Volume"); + strscpy(id1.name, "Aux Playback Volume"); + strscpy(id2.name, "CD Playback Volume"); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; @@ -713,14 +713,14 @@ static int snd_interwave_probe(struct snd_card *card, int dev, memset(&id1, 0, sizeof(id1)); memset(&id2, 0, sizeof(id2)); id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - strcpy(id1.name, "Master Playback Switch"); - strcpy(id2.name, id1.name); + strscpy(id1.name, "Master Playback Switch"); + strscpy(id2.name, id1.name); id2.index = 1; err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; - strcpy(id1.name, "Master Playback Volume"); - strcpy(id2.name, id1.name); + strscpy(id1.name, "Master Playback Volume"); + strscpy(id2.name, id1.name); err = snd_ctl_rename_id(card, &id1, &id2); if (err < 0) return err; @@ -742,8 +742,8 @@ static int snd_interwave_probe(struct snd_card *card, int dev, #else str = "InterWave STB"; #endif - strcpy(card->driver, str); - strcpy(card->shortname, str); + strscpy(card->driver, str); + strscpy(card->shortname, str); sprintf(card->longname, "%s at 0x%lx, irq %i, dma %d", str, gus->gf1.port, |