Commit 8aca8581 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] misc cleanups

OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth
The patch below contains the following changes in ALSA code not touched
by my previous patches:
- make some needlessly global code static
- remove the following unused global functions:
  - sound/i2c/cs84: snd_cs8427_detect
  - sound/synth/emux/emux_synth.c: snd_emux_release_voice
  - sound/synth/emux/soundfont.: snd_soundfont_mem_used
- remove the following unused EXPORT_SYMBOL's:
  - sound/i2c/cs8427.c: snd_cs8427_detect
  - sound/i2c/cs8427.c: snd_cs8427_reg_read
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1b14891f
......@@ -186,12 +186,9 @@
#define CS8427_VERSHIFT 0
#define CS8427_VER8427A 0x71
int snd_cs8427_detect(snd_i2c_bus_t *bus, unsigned char addr);
int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr,
unsigned int reset_timeout, snd_i2c_device_t **r_cs8427);
void snd_cs8427_reset(snd_i2c_device_t *cs8427);
int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val);
int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg);
int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427, snd_pcm_substream_t *playback_substream, snd_pcm_substream_t *capture_substream);
int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active);
int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate);
......
......@@ -112,7 +112,6 @@ void snd_sf_free(snd_sf_list_t *sflist);
int snd_soundfont_remove_samples(snd_sf_list_t *sflist);
int snd_soundfont_remove_unlocked(snd_sf_list_t *sflist);
int snd_soundfont_mem_used(snd_sf_list_t *sflist);
int snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
int preset, int bank,
......
......@@ -340,7 +340,6 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
*/
void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
int vx_set_clock(vx_core_t *chip, unsigned int freq);
void vx_change_clock_source(vx_core_t *chip, int source);
void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
int vx_change_frequency(vx_core_t *chip);
......
......@@ -80,7 +80,7 @@ static snd_opl3_drum_voice_t cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00}
/*
* set drum voice characteristics
*/
void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
{
unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
unsigned char voice_offset = data->voice;
......@@ -114,7 +114,7 @@ void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
/*
* Set drum voice pitch
*/
void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
{
unsigned char voice_offset = data->voice;
unsigned short opl3_reg;
......@@ -131,8 +131,8 @@ void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
/*
* Set drum voice volume and position
*/
void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data, int vel,
snd_midi_channel_t *chan)
static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
int vel, snd_midi_channel_t *chan)
{
unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
unsigned char voice_offset = data->voice;
......
......@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
{
unsigned long flags;
unsigned long port;
......@@ -60,7 +60,7 @@ void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
spin_unlock_irqrestore(&opl3->reg_lock, flags);
}
void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
{
unsigned long flags;
unsigned long port;
......
......@@ -263,7 +263,7 @@ void snd_opl3_timer_func(unsigned long data)
/*
* Start system timer
*/
void snd_opl3_start_timer(opl3_t *opl3)
static void snd_opl3_start_timer(opl3_t *opl3)
{
unsigned long flags;
spin_lock_irqsave(&opl3->sys_timer_lock, flags);
......
......@@ -96,7 +96,7 @@ void snd_opl3_synth_cleanup(opl3_t * opl3)
up(&opl3->access_mutex);
}
int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
{
opl3_t *opl3 = private_data;
int err;
......@@ -123,7 +123,7 @@ int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
return 0;
}
int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
{
opl3_t *opl3 = private_data;
......
......@@ -29,7 +29,7 @@
/*
* Array of DSP commands
*/
struct vx_cmd_info vx_dsp_cmds[] = {
static struct vx_cmd_info vx_dsp_cmds[] = {
[CMD_VERSION] = { 0x010000, 2, RMH_SSIZE_FIXED, 1 },
[CMD_SUPPORTED] = { 0x020000, 1, RMH_SSIZE_FIXED, 2 },
[CMD_TEST_IT] = { 0x040000, 1, RMH_SSIZE_FIXED, 1 },
......
......@@ -209,8 +209,6 @@ struct vx_cmd_info {
/*
*
*/
extern struct vx_cmd_info vx_dsp_cmds[];
void vx_init_rmh(struct vx_rmh *rmh, unsigned int cmd);
/**
......
......@@ -197,7 +197,7 @@ static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
* vx_change_clock_source - change the clock source
* @source: the new source
*/
void vx_change_clock_source(vx_core_t *chip, int source)
static void vx_change_clock_source(vx_core_t *chip, int source)
{
unsigned long flags;
......
......@@ -30,6 +30,8 @@
#include <sound/cs8427.h>
#include <sound/asoundef.h>
static void snd_cs8427_reset(snd_i2c_device_t *cs8427);
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("IEC958 (S/PDIF) receiver & transmitter by Cirrus Logic");
MODULE_LICENSE("GPL");
......@@ -65,16 +67,6 @@ static unsigned char swapbits(unsigned char val)
return res;
}
int snd_cs8427_detect(snd_i2c_bus_t *bus, unsigned char addr)
{
int res;
snd_i2c_lock(bus);
res = snd_i2c_probeaddr(bus, CS8427_ADDR | (addr & 7));
snd_i2c_unlock(bus);
return res;
}
int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val)
{
int err;
......@@ -89,7 +81,7 @@ int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned c
return 0;
}
int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
{
int err;
unsigned char buf;
......@@ -287,7 +279,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
* put back AES3INPUT. This workaround is described in latest
* CS8427 datasheet, otherwise TXDSERIAL will not work.
*/
void snd_cs8427_reset(snd_i2c_device_t *cs8427)
static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
{
cs8427_t *chip;
unsigned long end_time;
......@@ -572,11 +564,9 @@ static void __exit alsa_cs8427_module_exit(void)
module_init(alsa_cs8427_module_init)
module_exit(alsa_cs8427_module_exit)
EXPORT_SYMBOL(snd_cs8427_detect);
EXPORT_SYMBOL(snd_cs8427_create);
EXPORT_SYMBOL(snd_cs8427_reset);
EXPORT_SYMBOL(snd_cs8427_reg_write);
EXPORT_SYMBOL(snd_cs8427_reg_read);
EXPORT_SYMBOL(snd_cs8427_iec958_build);
EXPORT_SYMBOL(snd_cs8427_iec958_active);
EXPORT_SYMBOL(snd_cs8427_iec958_pcm);
......@@ -362,16 +362,6 @@ snd_emux_control(void *p, int type, snd_midi_channel_t *chan)
}
/*
* for Emu10k1 - release at least 1 voice currently using
*/
int
snd_emux_release_voice(snd_emux_t *emu)
{
return 0;
}
/*
* terminate note - if free flag is true, free the terminated voice
*/
......
......@@ -1460,11 +1460,3 @@ snd_soundfont_remove_unlocked(snd_sf_list_t *sflist)
return 0;
}
/*
* Return the used memory size (in words)
*/
int
snd_soundfont_mem_used(snd_sf_list_t *sflist)
{
return sflist->mem_used;
}
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