diff options
author | Jaroslav Kysela <perex@suse.cz> | 2004-11-29 11:16:54 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2004-11-29 11:16:54 +0100 |
commit | 67ded7003674ec1a053b8beb6866b1307ae9bfb6 (patch) | |
tree | bc4697e16decba98c6a800cf080d6d5fa65a4c46 /sound | |
parent | 353fac071433b00d7df6dd92321e95be52cc67d2 (diff) | |
download | history-67ded7003674ec1a053b8beb6866b1307ae9bfb6.tar.gz |
[ALSA] ALSA PCI drivers: misc cleanups
EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver
SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver
RME HDSP driver,RME9652 driver
The patch below does the following cleanups under sound/pci/ :
- make some needlessly global code static
- remove the following unused EXPORT_SYMBOL's:
- trident/trident_main.c: snd_trident_clear_voices
- trident/trident_main.c: snd_trident_synth_bzero
- remove the following unused global functions:
- azt3328.c: snd_azf3328_mixer_read
- emu10k1/io.c: snd_emu10k1_sum_vol_attn
- trident/trident_main.c: snd_trident_detach_synthesizer
- trident/trident_memory.c: snd_trident_synth_bzero
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/azt3328.c | 29 | ||||
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.c | 34 | ||||
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.h | 40 | ||||
-rw-r--r-- | sound/pci/cs46xx/dsp_spos.c | 8 | ||||
-rw-r--r-- | sound/pci/cs46xx/dsp_spos_scb_lib.c | 12 | ||||
-rw-r--r-- | sound/pci/cs46xx/imgs/cwcdma.h | 8 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1_synth.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 2 | ||||
-rw-r--r-- | sound/pci/emu10k1/io.c | 25 | ||||
-rw-r--r-- | sound/pci/korg1212/korg1212.c | 3 | ||||
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 8 | ||||
-rw-r--r-- | sound/pci/rme9652/rme9652.c | 2 | ||||
-rw-r--r-- | sound/pci/sonicvibes.c | 4 | ||||
-rw-r--r-- | sound/pci/trident/trident_main.c | 38 | ||||
-rw-r--r-- | sound/pci/trident/trident_memory.c | 23 | ||||
-rw-r--r-- | sound/pci/trident/trident_synth.c | 2 | ||||
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 4 |
18 files changed, 76 insertions, 172 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 279ec078f26d32..a1675fd03f413c 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -633,7 +633,7 @@ static int snd_ac97_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * (val1 << shift_left) | (val2 << shift_right)); } -int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol, +static int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol, int (*func)(snd_kcontrol_t *, snd_ctl_elem_value_t *)) { ac97_t *ac97 = snd_kcontrol_chip(kcontrol); diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 02c835a31604aa..7e2dee3488cf6e 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c @@ -214,17 +214,17 @@ static struct pci_device_id snd_azf3328_ids[] = { MODULE_DEVICE_TABLE(pci, snd_azf3328_ids); -void snd_azf3328_io2_write(azf3328_t *chip, int reg, unsigned char value) +static void snd_azf3328_io2_write(azf3328_t *chip, int reg, unsigned char value) { outb(value, chip->io2_port + reg); } -unsigned char snd_azf3328_io2_read(azf3328_t *chip, int reg) +static unsigned char snd_azf3328_io2_read(azf3328_t *chip, int reg) { return inb(chip->io2_port + reg); } -void snd_azf3328_mixer_write(azf3328_t *chip, int reg, unsigned long value, int type) +static void snd_azf3328_mixer_write(azf3328_t *chip, int reg, unsigned long value, int type) { switch(type) { case WORD_VALUE: @@ -239,26 +239,7 @@ void snd_azf3328_mixer_write(azf3328_t *chip, int reg, unsigned long value, int } } -unsigned long snd_azf3328_mixer_read(azf3328_t *chip, int reg, int type) -{ - unsigned long res = 0; - - switch(type) { - case WORD_VALUE: - res = (unsigned long)inw(chip->mixer_port + reg); - break; - case DWORD_VALUE: - res = (unsigned long)inl(chip->mixer_port + reg); - break; - case BYTE_VALUE: - res = (unsigned long)inb(chip->mixer_port + reg); - break; - } - - return res; -} - -void snd_azf3328_mixer_set_mute(azf3328_t *chip, int reg, int do_mute) +static void snd_azf3328_mixer_set_mute(azf3328_t *chip, int reg, int do_mute) { unsigned char oldval; @@ -272,7 +253,7 @@ void snd_azf3328_mixer_set_mute(azf3328_t *chip, int reg, int do_mute) outb(oldval, chip->mixer_port + reg + 1); } -void snd_azf3328_mixer_write_volume_gradually(azf3328_t *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay) +static void snd_azf3328_mixer_write_volume_gradually(azf3328_t *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay) { unsigned char curr_vol_left = 0, curr_vol_right = 0; int left_done = 0, right_done = 0; diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 565c45b5a0e278..d85f78c42f086d 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -68,6 +68,20 @@ static void amp_voyetra(cs46xx_t *chip, int change); +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static snd_pcm_ops_t snd_cs46xx_playback_rear_ops; +static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops; +static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops; +static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops; +static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops; +static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops; +#endif + +static snd_pcm_ops_t snd_cs46xx_playback_ops; +static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; +static snd_pcm_ops_t snd_cs46xx_capture_ops; +static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; + static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, unsigned short reg, int codec_index) @@ -1446,7 +1460,7 @@ static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream) } #ifdef CONFIG_SND_CS46XX_NEW_DSP -snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { .open = snd_cs46xx_playback_open_rear, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1457,7 +1471,7 @@ snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { .pointer = snd_cs46xx_playback_direct_pointer, }; -snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { .open = snd_cs46xx_playback_open_rear, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1469,7 +1483,7 @@ snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { .ack = snd_cs46xx_playback_transfer, }; -snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { .open = snd_cs46xx_playback_open_clfe, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1480,7 +1494,7 @@ snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { .pointer = snd_cs46xx_playback_direct_pointer, }; -snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { .open = snd_cs46xx_playback_open_clfe, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1492,7 +1506,7 @@ snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { .ack = snd_cs46xx_playback_transfer, }; -snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { .open = snd_cs46xx_playback_open_iec958, .close = snd_cs46xx_playback_close_iec958, .ioctl = snd_pcm_lib_ioctl, @@ -1503,7 +1517,7 @@ snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { .pointer = snd_cs46xx_playback_direct_pointer, }; -snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { .open = snd_cs46xx_playback_open_iec958, .close = snd_cs46xx_playback_close_iec958, .ioctl = snd_pcm_lib_ioctl, @@ -1517,7 +1531,7 @@ snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { #endif -snd_pcm_ops_t snd_cs46xx_playback_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_ops = { .open = snd_cs46xx_playback_open, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1528,7 +1542,7 @@ snd_pcm_ops_t snd_cs46xx_playback_ops = { .pointer = snd_cs46xx_playback_direct_pointer, }; -snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { +static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { .open = snd_cs46xx_playback_open, .close = snd_cs46xx_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -1540,7 +1554,7 @@ snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { .ack = snd_cs46xx_playback_transfer, }; -snd_pcm_ops_t snd_cs46xx_capture_ops = { +static snd_pcm_ops_t snd_cs46xx_capture_ops = { .open = snd_cs46xx_capture_open, .close = snd_cs46xx_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -1551,7 +1565,7 @@ snd_pcm_ops_t snd_cs46xx_capture_ops = { .pointer = snd_cs46xx_capture_direct_pointer, }; -snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { +static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { .open = snd_cs46xx_capture_open, .close = snd_cs46xx_capture_close, .ioctl = snd_pcm_lib_ioctl, diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h index 52575f92472004..d7bec096d247fb 100644 --- a/sound/pci/cs46xx/cs46xx_lib.h +++ b/sound/pci/cs46xx/cs46xx_lib.h @@ -53,18 +53,6 @@ #define BA1_DWORD_SIZE (13 * 1024 + 512) #define BA1_MEMORY_COUNT 3 -extern snd_pcm_ops_t snd_cs46xx_playback_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; -extern snd_pcm_ops_t snd_cs46xx_capture_ops; -extern snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_rear_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_iec958_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_clfe_ops; -extern snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops; - - /* * common I/O routines */ @@ -99,11 +87,9 @@ dsp_spos_instance_t * cs46xx_dsp_spos_create (cs46xx_t * chip); void cs46xx_dsp_spos_destroy (cs46xx_t * chip); int cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module); symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type); -symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip,u32 address,int symbol_type); int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip); int cs46xx_dsp_proc_done (cs46xx_t *chip); int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip); -int cs46xx_dsp_async_init (cs46xx_t *chip,dsp_scb_descriptor_t * fg_entry); int snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset, unsigned long len); int snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len); @@ -120,8 +106,6 @@ int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data) dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest); void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb); void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb); -dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, - u32 * task_data,u32 dest,int size); dsp_scb_descriptor_t * cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip); dsp_scb_descriptor_t * cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name, u16 channel_disp,u16 fifo_addr, @@ -136,21 +120,11 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * cod dsp_scb_descriptor_t * parent_scb, int scb_child_type); void cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb); -dsp_scb_descriptor_t * cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, - u32 * scb_data,u32 dest, - char * task_entry_name, - dsp_scb_descriptor_t * parent_scb, - int scb_child_type); dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, u16 channel_disp,u16 fifo_addr, u16 sample_buffer_addr, u32 dest,dsp_scb_descriptor_t * parent_scb, int scb_child_type); -dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name, - u16 sample_buffer_addr,u32 dest, - int virtual_channel,u32 playback_hw_addr, - dsp_scb_descriptor_t * parent_scb, - int scb_child_type); dsp_scb_descriptor_t * cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, int sample_rate, u16 src_buffer_addr, @@ -169,15 +143,6 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char u32 dest, dsp_scb_descriptor_t * parent_scb, int scb_child_type); -dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest, - dsp_scb_descriptor_t * input_scb, - dsp_scb_descriptor_t * parent_scb, - int scb_child_type); -dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest, - u16 hfg_scb_address, - u16 asynch_buffer_address, - dsp_scb_descriptor_t * parent_scb, - int scb_child_type); dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest, u16 hfg_scb_address, u16 asynch_buffer_address, @@ -190,11 +155,6 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,cha u16 mix_buffer_addr,u16 writeback_spb,u32 dest, dsp_scb_descriptor_t * parent_scb, int scb_child_type); -dsp_scb_descriptor_t * cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, - u16 snoop_buffer_address, - dsp_scb_descriptor_t * snoop_scb, - dsp_scb_descriptor_t * parent_scb, - int scb_child_type); dsp_scb_descriptor_t * cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, u16 snoop_buffer_address, dsp_scb_descriptor_t * snoop_scb, diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 25c68e91d8b145..e1d41bcbbe2abc 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c @@ -37,6 +37,8 @@ #include "cs46xx_lib.h" #include "dsp_spos.h" +static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry); + static wide_opcode_t wide_opcodes[] = { WIDE_FOR_BEGIN_LOOP, WIDE_FOR_BEGIN_LOOP2, @@ -439,7 +441,7 @@ symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name, } -symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type) +static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type) { int i; dsp_spos_instance_t * ins = chip->dsp_spos_instance; @@ -1019,7 +1021,7 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * } -dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size) +static dsp_task_descriptor_t * cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size) { dsp_task_descriptor_t * desc; @@ -1452,7 +1454,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip) return -EINVAL; } -int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry) +static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry) { dsp_spos_instance_t * ins = chip->dsp_spos_instance; symbol_entry_t * s16_async_codec_input_task; diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index acd0db847e72b8..92849e1340bbfb 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -342,7 +342,7 @@ _dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest, return scb; } -dsp_scb_descriptor_t * +static dsp_scb_descriptor_t * cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest, char * task_entry_name, dsp_scb_descriptor_t * parent_scb, @@ -481,7 +481,7 @@ cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name, } -dsp_scb_descriptor_t * +static dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name, u16 sample_buffer_addr,u32 dest, int virtual_channel, u32 playback_hw_addr, @@ -687,6 +687,7 @@ cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name, return scb; } +#if 0 /* not used */ dsp_scb_descriptor_t * cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name, u16 buffer_addr,u32 dest, @@ -735,6 +736,7 @@ cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name, return scb; } +#endif /* not used */ dsp_scb_descriptor_t * cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name, @@ -874,7 +876,7 @@ cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name, } -dsp_scb_descriptor_t * +static dsp_scb_descriptor_t * cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest, dsp_scb_descriptor_t * input_scb, dsp_scb_descriptor_t * parent_scb, @@ -917,7 +919,7 @@ cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest, } -dsp_scb_descriptor_t * +static dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest, u16 hfg_scb_address, u16 asynch_buffer_address, @@ -1013,6 +1015,7 @@ cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest, } +#if 0 /* not used */ dsp_scb_descriptor_t * cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, u16 snoop_buffer_address, @@ -1052,6 +1055,7 @@ cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest, scb_child_type); return scb; } +#endif /* not used */ dsp_scb_descriptor_t * diff --git a/sound/pci/cs46xx/imgs/cwcdma.h b/sound/pci/cs46xx/imgs/cwcdma.h index 7b6e65be328ed8..92860435beed44 100644 --- a/sound/pci/cs46xx/imgs/cwcdma.h +++ b/sound/pci/cs46xx/imgs/cwcdma.h @@ -3,7 +3,7 @@ #ifndef __HEADER_cwcdma_H__ #define __HEADER_cwcdma_H__ -symbol_entry_t cwcdma_symbols[] = { +static symbol_entry_t cwcdma_symbols[] = { { 0x8000, "EXECCHILD",0x03 }, { 0x8001, "EXECCHILD_98",0x03 }, { 0x8003, "EXECCHILD_PUSH1IND",0x03 }, @@ -33,7 +33,7 @@ symbol_entry_t cwcdma_symbols[] = { { 0x0018, "#CODE_END",0x00 }, }; /* cwcdma symbols */ -u32 cwcdma_code[] = { +static u32 cwcdma_code[] = { /* OVERLAYBEGINADDRESS */ /* 0000 */ 0x00002731,0x00001400,0x0004c108,0x000e5044, /* 0002 */ 0x0005f608,0x00000000,0x000007ae,0x000be300, @@ -51,11 +51,11 @@ u32 cwcdma_code[] = { /* #CODE_END */ -segment_desc_t cwcdma_segments[] = { +static segment_desc_t cwcdma_segments[] = { { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000030, cwcdma_code }, }; -dsp_module_desc_t cwcdma_module = { +static dsp_module_desc_t cwcdma_module = { "cwcdma", { 27, diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c index 2af8ffa6b9a600..8bd58d1dcc2642 100644 --- a/sound/pci/emu10k1/emu10k1_synth.c +++ b/sound/pci/emu10k1/emu10k1_synth.c @@ -28,7 +28,7 @@ MODULE_LICENSE("GPL"); /* * create a new hardware dependent device for Emu10k1 */ -int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) +static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) { snd_emux_t *emu; emu10k1_t *hw; @@ -76,7 +76,7 @@ int snd_emu10k1_synth_new_device(snd_seq_device_t *dev) return 0; } -int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev) +static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev) { snd_emux_t *emu; emu10k1_t *hw; diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index d78d1c50ea7eb9..1948f904dff323 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -489,7 +489,7 @@ static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned i #define A_OP(icode, ptr, op, r, a, x, y) \ snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y) -void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data) +static void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data) { pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; snd_emu10k1_ptr_write(emu, pc, 0, data); diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index 22d8e3dd60ffbd..dfe327a27af8db 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c @@ -313,28 +313,3 @@ unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate) return 0; /* Should never reach this point */ } -/* - * Returns an attenuation based upon a cumulative volume value - * Algorithm calculates 0x200 - 0x10 log2 (input) - */ - -unsigned char snd_emu10k1_sum_vol_attn(unsigned int value) -{ - unsigned short count = 16, ans; - - if (value == 0) - return 0xFF; - - /* Find first SET bit. This is the integer part of the value */ - while ((value & 0x10000) == 0) { - value <<= 1; - count--; - } - - /* The REST of the data is the fractional part. */ - ans = (unsigned short) (0x110 - ((count << 4) + ((value & 0x0FFFFL) >> 12))); - if (ans > 0xFF) - ans = 0xFF; - - return (unsigned char) ans; -} diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index ca256c4f18b9a0..e89b826c675150 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -472,7 +472,8 @@ static char* channelName[] = { "SPDIF-R", }; -u16 ClockSourceSelector[] = {0x8000, // selects source as ADAT at 44.1 kHz +static u16 ClockSourceSelector[] = + {0x8000, // selects source as ADAT at 44.1 kHz 0x0000, // selects source as ADAT at 48 kHz 0x8001, // selects source as S/PDIF at 44.1 kHz 0x0001, // selects source as S/PDIF at 48 kHz diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 05665b08bda985..a730a19c488376 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -1444,14 +1444,14 @@ static int snd_hdsp_midi_output_close(snd_rawmidi_substream_t * substream) return 0; } -snd_rawmidi_ops_t snd_hdsp_midi_output = +static snd_rawmidi_ops_t snd_hdsp_midi_output = { .open = snd_hdsp_midi_output_open, .close = snd_hdsp_midi_output_close, .trigger = snd_hdsp_midi_output_trigger, }; -snd_rawmidi_ops_t snd_hdsp_midi_input = +static snd_rawmidi_ops_t snd_hdsp_midi_input = { .open = snd_hdsp_midi_input_open, .close = snd_hdsp_midi_input_close, @@ -3138,7 +3138,7 @@ HDSP_LINE_OUT("Line Out", 0), static snd_kcontrol_new_t snd_hdsp_96xx_aeb = HDSP_AEB("Analog Extension Board", 0); static snd_kcontrol_new_t snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK; -int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp) +static int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp) { unsigned int idx; int err; @@ -3652,7 +3652,7 @@ static int snd_hdsp_set_defaults(hdsp_t *hdsp) return 0; } -void hdsp_midi_tasklet(unsigned long arg) +static void hdsp_midi_tasklet(unsigned long arg) { hdsp_t *hdsp = (hdsp_t *)arg; diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 420779931869e7..69cd81eaa111bc 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -1584,7 +1584,7 @@ RME9652_ADAT_SYNC("ADAT3 Sync Check", 0, 2); static snd_kcontrol_new_t snd_rme9652_adat1_input = RME9652_ADAT1_IN("ADAT1 Input Source", 0); -int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652) +static int snd_rme9652_create_controls(snd_card_t *card, rme9652_t *rme9652) { unsigned int idx; int err; diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 8dcfc0800c4933..80d225d7c64060 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -357,8 +357,8 @@ static unsigned char snd_sonicvibes_in(sonicvibes_t * sonic, unsigned char reg) return value; } -#ifdef CONFIG_SND_DEBUG -void snd_sonicvibes_debug(sonicvibes_t * sonic) +#if 0 +static void snd_sonicvibes_debug(sonicvibes_t * sonic) { printk("SV REGS: INDEX = 0x%02x ", inb(SV_REG(sonic, INDEX))); printk(" STATUS = 0x%02x\n", inb(SV_REG(sonic, STATUS))); diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 815e87883e8628..bb0d87f3b7dbc1 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -53,6 +53,9 @@ static int snd_trident_resume(snd_card_t *card, unsigned int state); #endif static int snd_trident_sis_reset(trident_t *trident); +static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max); +static int snd_trident_free(trident_t *trident); + /* * common I/O routines */ @@ -632,7 +635,7 @@ static void snd_trident_write_cvol_reg(trident_t * trident, snd_trident_voice_t Returns: Delta value. ---------------------------------------------------------------------------*/ -unsigned int snd_trident_convert_rate(unsigned int rate) +static unsigned int snd_trident_convert_rate(unsigned int rate) { unsigned int delta; @@ -692,7 +695,7 @@ static unsigned int snd_trident_convert_adc_rate(unsigned int rate) Returns: Delta value. ---------------------------------------------------------------------------*/ -unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size) +static unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size) { unsigned int res = (rate * period_size) / 48000; if (res < 64) @@ -713,7 +716,7 @@ unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int peri Returns: Control value. ---------------------------------------------------------------------------*/ -unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream) +static unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream) { unsigned int CTRL; snd_pcm_runtime_t *runtime = substream->runtime; @@ -770,8 +773,8 @@ static int snd_trident_ioctl(snd_pcm_substream_t * substream, ---------------------------------------------------------------------------*/ -int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) +static int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream, + snd_pcm_hw_params_t * hw_params) { trident_t *trident = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; @@ -804,8 +807,8 @@ int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream, ---------------------------------------------------------------------------*/ -int snd_trident_allocate_evoice(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) +static int snd_trident_allocate_evoice(snd_pcm_substream_t * substream, + snd_pcm_hw_params_t * hw_params) { trident_t *trident = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; @@ -3658,7 +3661,7 @@ int __devinit snd_trident_create(snd_card_t * card, ---------------------------------------------------------------------------*/ -int snd_trident_free(trident_t *trident) +static int snd_trident_free(trident_t *trident) { #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) if (trident->gameport) { @@ -3807,9 +3810,9 @@ static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs * } /*--------------------------------------------------------------------------- - snd_trident_attach_synthesizer, snd_trident_detach_synthesizer + snd_trident_attach_synthesizer - Description: Attach/detach synthesizer hooks + Description: Attach synthesizer hooks Paramters: trident - device specific private data for 4DWave card @@ -3828,17 +3831,6 @@ int snd_trident_attach_synthesizer(trident_t *trident) return 0; } -int snd_trident_detach_synthesizer(trident_t *trident) -{ -#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) - if (trident->seq_dev) { - snd_device_free(trident->card, trident->seq_dev); - trident->seq_dev = NULL; - } -#endif - return 0; -} - snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port) { snd_trident_voice_t *pvoice; @@ -3911,7 +3903,7 @@ void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice) private_free(voice); } -void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max) +static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max) { unsigned int i, val, mask[2] = { 0, 0 }; @@ -4001,9 +3993,7 @@ EXPORT_SYMBOL(snd_trident_free_voice); EXPORT_SYMBOL(snd_trident_start_voice); EXPORT_SYMBOL(snd_trident_stop_voice); EXPORT_SYMBOL(snd_trident_write_voice_regs); -EXPORT_SYMBOL(snd_trident_clear_voices); /* trident_memory.c symbols */ EXPORT_SYMBOL(snd_trident_synth_alloc); EXPORT_SYMBOL(snd_trident_synth_free); -EXPORT_SYMBOL(snd_trident_synth_bzero); EXPORT_SYMBOL(snd_trident_synth_copy_from_user); diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c index 6fd58f18047318..6cc282681e096c 100644 --- a/sound/pci/trident/trident_memory.c +++ b/sound/pci/trident/trident_memory.c @@ -450,29 +450,6 @@ static int synth_free_pages(trident_t *trident, snd_util_memblk_t *blk) } /* - * bzero(blk + offset, size) - */ -int snd_trident_synth_bzero(trident_t *trident, snd_util_memblk_t *blk, int offset, int size) -{ - int page, nextofs, end_offset, temp, temp1; - - offset += blk->offset; - end_offset = offset + size; - page = get_aligned_page(offset) + 1; - do { - nextofs = aligned_page_offset(page); - temp = nextofs - offset; - temp1 = end_offset - offset; - if (temp1 < temp) - temp = temp1; - memset(offset_ptr(trident, offset), 0, temp); - offset = nextofs; - page++; - } while (offset < end_offset); - return 0; -} - -/* * copy_from_user(blk + offset, data, size) */ int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size) diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c index f783bd2bddb2a2..64aab2346b4640 100644 --- a/sound/pci/trident/trident_synth.c +++ b/sound/pci/trident/trident_synth.c @@ -811,7 +811,7 @@ static void snd_trident_synth_free_private_instruments(snd_trident_port_t * p, i snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0); } -int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop) +static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop) { snd_trident_port_t *p = (snd_trident_port_t *) private_data; diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 87214a02b50ac8..81d833db59cbaf 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -258,7 +258,7 @@ static int voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpc return -ENOMEM; } -int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice) +static int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice) { unsigned long flags; int result; @@ -278,7 +278,7 @@ int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, y return result; } -int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice) +static int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice) { unsigned long flags; |