Commit d7eb2712 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Designated initializers for sound_ppc

The old form of designated initializers are obsolete: we need to
replace them with the ISO C forms before 2.6.  Gcc has always supported
both forms anyway.
parent e2baa0bb
...@@ -165,10 +165,10 @@ static int snd_pmac_awacs_put_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu ...@@ -165,10 +165,10 @@ static int snd_pmac_awacs_put_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
#define AWACS_VOLUME(xname, xreg, xshift) \ #define AWACS_VOLUME(xname, xreg, xshift) \
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
info: snd_pmac_awacs_info_volume, \ .info = snd_pmac_awacs_info_volume, \
get: snd_pmac_awacs_get_volume, \ .get = snd_pmac_awacs_get_volume, \
put: snd_pmac_awacs_put_volume, \ .put = snd_pmac_awacs_put_volume, \
private_value: (xreg) | ((xshift) << 8) } private_value: (xreg) | ((xshift) << 8) }
/* /*
...@@ -214,10 +214,10 @@ static int snd_pmac_awacs_put_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu ...@@ -214,10 +214,10 @@ static int snd_pmac_awacs_put_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
} }
#define AWACS_SWITCH(xname, xreg, xshift, xinvert) \ #define AWACS_SWITCH(xname, xreg, xshift, xinvert) \
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
info: snd_pmac_boolean_mono_info, \ .info = snd_pmac_boolean_mono_info, \
get: snd_pmac_awacs_get_switch, \ .get = snd_pmac_awacs_get_switch, \
put: snd_pmac_awacs_put_switch, \ .put = snd_pmac_awacs_put_switch, \
private_value: (xreg) | ((xshift) << 8) | ((xinvert) << 16) } private_value: (xreg) | ((xshift) << 8) | ((xinvert) << 16) }
...@@ -422,58 +422,58 @@ static int snd_pmac_awacs_put_master_amp(snd_kcontrol_t *kcontrol, snd_ctl_elem_ ...@@ -422,58 +422,58 @@ static int snd_pmac_awacs_put_master_amp(snd_kcontrol_t *kcontrol, snd_ctl_elem_
#define AMP_CH_HD 1 #define AMP_CH_HD 1
static snd_kcontrol_new_t snd_pmac_awacs_amp_vol[] __initdata = { static snd_kcontrol_new_t snd_pmac_awacs_amp_vol[] __initdata = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "PC Speaker Playback Volume", .name = "PC Speaker Playback Volume",
info: snd_pmac_awacs_info_volume_amp, .info = snd_pmac_awacs_info_volume_amp,
get: snd_pmac_awacs_get_volume_amp, .get = snd_pmac_awacs_get_volume_amp,
put: snd_pmac_awacs_put_volume_amp, .put = snd_pmac_awacs_put_volume_amp,
private_value: AMP_CH_SPK, .private_value = AMP_CH_SPK,
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Headphone Playback Volume", .name = "Headphone Playback Volume",
info: snd_pmac_awacs_info_volume_amp, .info = snd_pmac_awacs_info_volume_amp,
get: snd_pmac_awacs_get_volume_amp, .get = snd_pmac_awacs_get_volume_amp,
put: snd_pmac_awacs_put_volume_amp, .put = snd_pmac_awacs_put_volume_amp,
private_value: AMP_CH_HD, .private_value = AMP_CH_HD,
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Tone Control - Bass", .name = "Tone Control - Bass",
info: snd_pmac_awacs_info_tone_amp, .info = snd_pmac_awacs_info_tone_amp,
get: snd_pmac_awacs_get_tone_amp, .get = snd_pmac_awacs_get_tone_amp,
put: snd_pmac_awacs_put_tone_amp, .put = snd_pmac_awacs_put_tone_amp,
private_value: 0, .private_value = 0,
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Tone Control - Treble", .name = "Tone Control - Treble",
info: snd_pmac_awacs_info_tone_amp, .info = snd_pmac_awacs_info_tone_amp,
get: snd_pmac_awacs_get_tone_amp, .get = snd_pmac_awacs_get_tone_amp,
put: snd_pmac_awacs_put_tone_amp, .put = snd_pmac_awacs_put_tone_amp,
private_value: 1, .private_value = 1,
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Amp Master Playback Volume", .name = "Amp Master Playback Volume",
info: snd_pmac_awacs_info_master_amp, .info = snd_pmac_awacs_info_master_amp,
get: snd_pmac_awacs_get_master_amp, .get = snd_pmac_awacs_get_master_amp,
put: snd_pmac_awacs_put_master_amp, .put = snd_pmac_awacs_put_master_amp,
}, },
}; };
static snd_kcontrol_new_t snd_pmac_awacs_amp_hp_sw __initdata = { static snd_kcontrol_new_t snd_pmac_awacs_amp_hp_sw __initdata = {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Headphone Playback Switch", .name = "Headphone Playback Switch",
info: snd_pmac_boolean_stereo_info, .info = snd_pmac_boolean_stereo_info,
get: snd_pmac_awacs_get_switch_amp, .get = snd_pmac_awacs_get_switch_amp,
put: snd_pmac_awacs_put_switch_amp, .put = snd_pmac_awacs_put_switch_amp,
private_value: AMP_CH_HD, .private_value = AMP_CH_HD,
}; };
static snd_kcontrol_new_t snd_pmac_awacs_amp_spk_sw __initdata = { static snd_kcontrol_new_t snd_pmac_awacs_amp_spk_sw __initdata = {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "PC Speaker Playback Switch", .name = "PC Speaker Playback Switch",
info: snd_pmac_boolean_stereo_info, .info = snd_pmac_boolean_stereo_info,
get: snd_pmac_awacs_get_switch_amp, .get = snd_pmac_awacs_get_switch_amp,
put: snd_pmac_awacs_put_switch_amp, .put = snd_pmac_awacs_put_switch_amp,
private_value: AMP_CH_SPK, .private_value = AMP_CH_SPK,
}; };
#endif /* PMAC_AMP_AVAIL */ #endif /* PMAC_AMP_AVAIL */
...@@ -556,11 +556,11 @@ static snd_kcontrol_new_t snd_pmac_awacs_mic_boost[] __initdata = { ...@@ -556,11 +556,11 @@ static snd_kcontrol_new_t snd_pmac_awacs_mic_boost[] __initdata = {
}; };
static snd_kcontrol_new_t snd_pmac_screamer_mic_boost[] __initdata = { static snd_kcontrol_new_t snd_pmac_screamer_mic_boost[] __initdata = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Mic Boost", .name = "Mic Boost",
info: snd_pmac_screamer_mic_boost_info, .info = snd_pmac_screamer_mic_boost_info,
get: snd_pmac_screamer_mic_boost_get, .get = snd_pmac_screamer_mic_boost_get,
put: snd_pmac_screamer_mic_boost_put, .put = snd_pmac_screamer_mic_boost_put,
}, },
}; };
......
...@@ -196,10 +196,10 @@ static int snd_pmac_burgundy_put_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_v ...@@ -196,10 +196,10 @@ static int snd_pmac_burgundy_put_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_v
} }
#define BURGUNDY_VOLUME(xname, xindex, addr, shift) \ #define BURGUNDY_VOLUME(xname, xindex, addr, shift) \
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
info: snd_pmac_burgundy_info_volume,\ .info = snd_pmac_burgundy_info_volume,\
get: snd_pmac_burgundy_get_volume,\ .get = snd_pmac_burgundy_get_volume,\
put: snd_pmac_burgundy_put_volume,\ .put = snd_pmac_burgundy_put_volume,\
private_value: ((ADDR2BASE(addr) & 0xff) | ((shift) << 8)) } private_value: ((ADDR2BASE(addr) & 0xff) | ((shift) << 8)) }
/* lineout/speaker */ /* lineout/speaker */
...@@ -245,10 +245,10 @@ static int snd_pmac_burgundy_put_switch_out(snd_kcontrol_t *kcontrol, snd_ctl_el ...@@ -245,10 +245,10 @@ static int snd_pmac_burgundy_put_switch_out(snd_kcontrol_t *kcontrol, snd_ctl_el
} }
#define BURGUNDY_OUTPUT_SWITCH(xname, xindex, lmask, rmask, stereo) \ #define BURGUNDY_OUTPUT_SWITCH(xname, xindex, lmask, rmask, stereo) \
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
info: snd_pmac_burgundy_info_switch_out,\ .info = snd_pmac_burgundy_info_switch_out,\
get: snd_pmac_burgundy_get_switch_out,\ .get = snd_pmac_burgundy_get_switch_out,\
put: snd_pmac_burgundy_put_switch_out,\ .put = snd_pmac_burgundy_put_switch_out,\
private_value: ((lmask) | ((rmask) << 8) | ((stereo) << 24)) } private_value: ((lmask) | ((rmask) << 8) | ((stereo) << 24)) }
/* line/speaker output volume */ /* line/speaker output volume */
...@@ -295,10 +295,10 @@ static int snd_pmac_burgundy_put_volume_out(snd_kcontrol_t *kcontrol, snd_ctl_el ...@@ -295,10 +295,10 @@ static int snd_pmac_burgundy_put_volume_out(snd_kcontrol_t *kcontrol, snd_ctl_el
} }
#define BURGUNDY_OUTPUT_VOLUME(xname, xindex, addr, stereo) \ #define BURGUNDY_OUTPUT_VOLUME(xname, xindex, addr, stereo) \
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
info: snd_pmac_burgundy_info_volume_out,\ .info = snd_pmac_burgundy_info_volume_out,\
get: snd_pmac_burgundy_get_volume_out,\ .get = snd_pmac_burgundy_get_volume_out,\
put: snd_pmac_burgundy_put_volume_out,\ .put = snd_pmac_burgundy_put_volume_out,\
private_value: (ADDR2BASE(addr) | ((stereo) << 24)) } private_value: (ADDR2BASE(addr) | ((stereo) << 24)) }
static snd_kcontrol_new_t snd_pmac_burgundy_mixers[] __initdata = { static snd_kcontrol_new_t snd_pmac_burgundy_mixers[] __initdata = {
......
...@@ -197,22 +197,22 @@ static int daca_put_amp(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol ...@@ -197,22 +197,22 @@ static int daca_put_amp(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol
} }
static snd_kcontrol_new_t daca_mixers[] = { static snd_kcontrol_new_t daca_mixers[] = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Deemphasis Switch", .name = "Deemphasis Switch",
info: daca_info_deemphasis, .info = daca_info_deemphasis,
get: daca_get_deemphasis, .get = daca_get_deemphasis,
put: daca_put_deemphasis put: daca_put_deemphasis
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Master Playback Volume", .name = "Master Playback Volume",
info: daca_info_volume, .info = daca_info_volume,
get: daca_get_volume, .get = daca_get_volume,
put: daca_put_volume put: daca_put_volume
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Power Amplifier Switch", .name = "Power Amplifier Switch",
info: daca_info_amp, .info = daca_info_amp,
get: daca_get_amp, .get = daca_get_amp,
put: daca_put_amp put: daca_put_amp
}, },
}; };
......
...@@ -40,11 +40,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter); ...@@ -40,11 +40,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter);
static int keywest_detach_client(struct i2c_client *client); static int keywest_detach_client(struct i2c_client *client);
struct i2c_driver keywest_driver = { struct i2c_driver keywest_driver = {
name: "PMac Keywest Audio", .name = "PMac Keywest Audio",
id: I2C_DRIVERID_KEYWEST, .id = I2C_DRIVERID_KEYWEST,
flags: I2C_DF_NOTIFY, .flags = I2C_DF_NOTIFY,
attach_adapter: &keywest_attach_adapter, .attach_adapter = &keywest_attach_adapter,
detach_client: &keywest_detach_client, .detach_client = &keywest_detach_client,
}; };
......
...@@ -442,17 +442,17 @@ static snd_pcm_hardware_t snd_pmac_playback = ...@@ -442,17 +442,17 @@ static snd_pcm_hardware_t snd_pmac_playback =
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_RESUME), SNDRV_PCM_INFO_RESUME),
formats: SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
rates: SNDRV_PCM_RATE_8000_44100, .rates = SNDRV_PCM_RATE_8000_44100,
rate_min: 7350, .rate_min = 7350,
rate_max: 44100, .rate_max = 44100,
channels_min: 2, .channels_min = 2,
channels_max: 2, .channels_max = 2,
buffer_bytes_max: 32768, .buffer_bytes_max = 32768,
period_bytes_min: 256, .period_bytes_min = 256,
period_bytes_max: 16384, .period_bytes_max = 16384,
periods_min: 1, .periods_min = 1,
periods_max: PMAC_MAX_FRAGS, .periods_max = PMAC_MAX_FRAGS,
}; };
static snd_pcm_hardware_t snd_pmac_capture = static snd_pcm_hardware_t snd_pmac_capture =
...@@ -461,17 +461,17 @@ static snd_pcm_hardware_t snd_pmac_capture = ...@@ -461,17 +461,17 @@ static snd_pcm_hardware_t snd_pmac_capture =
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_RESUME), SNDRV_PCM_INFO_RESUME),
formats: SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
rates: SNDRV_PCM_RATE_8000_44100, .rates = SNDRV_PCM_RATE_8000_44100,
rate_min: 7350, .rate_min = 7350,
rate_max: 44100, .rate_max = 44100,
channels_min: 2, .channels_min = 2,
channels_max: 2, .channels_max = 2,
buffer_bytes_max: 32768, .buffer_bytes_max = 32768,
period_bytes_min: 256, .period_bytes_min = 256,
period_bytes_max: 16384, .period_bytes_max = 16384,
periods_min: 1, .periods_min = 1,
periods_max: PMAC_MAX_FRAGS, .periods_max = PMAC_MAX_FRAGS,
}; };
...@@ -628,25 +628,25 @@ static int snd_pmac_capture_close(snd_pcm_substream_t *subs) ...@@ -628,25 +628,25 @@ static int snd_pmac_capture_close(snd_pcm_substream_t *subs)
*/ */
static snd_pcm_ops_t snd_pmac_playback_ops = { static snd_pcm_ops_t snd_pmac_playback_ops = {
open: snd_pmac_playback_open, .open = snd_pmac_playback_open,
close: snd_pmac_playback_close, .close = snd_pmac_playback_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_pmac_pcm_hw_params, .hw_params = snd_pmac_pcm_hw_params,
hw_free: snd_pmac_pcm_hw_free, .hw_free = snd_pmac_pcm_hw_free,
prepare: snd_pmac_playback_prepare, .prepare = snd_pmac_playback_prepare,
trigger: snd_pmac_playback_trigger, .trigger = snd_pmac_playback_trigger,
pointer: snd_pmac_playback_pointer, .pointer = snd_pmac_playback_pointer,
}; };
static snd_pcm_ops_t snd_pmac_capture_ops = { static snd_pcm_ops_t snd_pmac_capture_ops = {
open: snd_pmac_capture_open, .open = snd_pmac_capture_open,
close: snd_pmac_capture_close, .close = snd_pmac_capture_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_pmac_pcm_hw_params, .hw_params = snd_pmac_pcm_hw_params,
hw_free: snd_pmac_pcm_hw_free, .hw_free = snd_pmac_pcm_hw_free,
prepare: snd_pmac_capture_prepare, .prepare = snd_pmac_capture_prepare,
trigger: snd_pmac_capture_trigger, .trigger = snd_pmac_capture_trigger,
pointer: snd_pmac_capture_pointer, .pointer = snd_pmac_capture_pointer,
}; };
static void pmac_pcm_free(snd_pcm_t *pcm) static void pmac_pcm_free(snd_pcm_t *pcm)
...@@ -871,12 +871,12 @@ static int snd_pmac_put_beep(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco ...@@ -871,12 +871,12 @@ static int snd_pmac_put_beep(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
} }
static snd_kcontrol_new_t snd_pmac_beep_mixer = { static snd_kcontrol_new_t snd_pmac_beep_mixer = {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Beep Playback Volume", .name = "Beep Playback Volume",
index: 0, .index = 0,
info: snd_pmac_info_beep, .info = snd_pmac_info_beep,
get: snd_pmac_get_beep, .get = snd_pmac_get_beep,
put: snd_pmac_put_beep, .put = snd_pmac_put_beep,
}; };
static void snd_pmac_beep_free(snd_kcontrol_t *control) static void snd_pmac_beep_free(snd_kcontrol_t *control)
...@@ -1271,17 +1271,17 @@ static int pmac_hp_detect_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc ...@@ -1271,17 +1271,17 @@ static int pmac_hp_detect_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
} }
static snd_kcontrol_new_t auto_mute_controls[] __initdata = { static snd_kcontrol_new_t auto_mute_controls[] __initdata = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Auto Mute Switch", .name = "Auto Mute Switch",
info: snd_pmac_boolean_mono_info, .info = snd_pmac_boolean_mono_info,
get: pmac_auto_mute_get, .get = pmac_auto_mute_get,
put: pmac_auto_mute_put, .put = pmac_auto_mute_put,
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Headphone Detection", .name = "Headphone Detection",
access: SNDRV_CTL_ELEM_ACCESS_READ, .access = SNDRV_CTL_ELEM_ACCESS_READ,
info: snd_pmac_boolean_mono_info, .info = snd_pmac_boolean_mono_info,
get: pmac_hp_detect_get, .get = pmac_hp_detect_get,
}, },
}; };
...@@ -1306,7 +1306,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return) ...@@ -1306,7 +1306,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
struct device_node *np; struct device_node *np;
int i, err; int i, err;
static snd_device_ops_t ops = { static snd_device_ops_t ops = {
dev_free: snd_pmac_dev_free, .dev_free = snd_pmac_dev_free,
}; };
snd_runtime_check(chip_return, return -EINVAL); snd_runtime_check(chip_return, return -EINVAL);
......
...@@ -410,46 +410,46 @@ static int tumbler_put_mono(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon ...@@ -410,46 +410,46 @@ static int tumbler_put_mono(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
} }
static struct tumbler_mono_vol tumbler_pcm_vol_info = { static struct tumbler_mono_vol tumbler_pcm_vol_info = {
index: VOL_IDX_PCM, .index = VOL_IDX_PCM,
reg: TAS_REG_PCM, .reg = TAS_REG_PCM,
bytes: 3, .bytes = 3,
max: number_of(mixer_volume_table), .max = number_of(mixer_volume_table),
table: mixer_volume_table, .table = mixer_volume_table,
}; };
#if 0 // for what? #if 0 // for what?
static struct tumbler_mono_vol tumbler_altpcm_vol_info = { static struct tumbler_mono_vol tumbler_altpcm_vol_info = {
index: VOL_IDX_ALTPCM, .index = VOL_IDX_ALTPCM,
reg: TAS_REG_INPUT2, .reg = TAS_REG_INPUT2,
bytes: 3, .bytes = 3,
max: number_of(mixer_volume_table), .max = number_of(mixer_volume_table),
table: mixer_volume_table, .table = mixer_volume_table,
}; };
#endif #endif
static struct tumbler_mono_vol tumbler_bass_vol_info = { static struct tumbler_mono_vol tumbler_bass_vol_info = {
index: VOL_IDX_BASS, .index = VOL_IDX_BASS,
reg: TAS_REG_BASS, .reg = TAS_REG_BASS,
bytes: 1, .bytes = 1,
max: number_of(bass_volume_table), .max = number_of(bass_volume_table),
table: bass_volume_table, .table = bass_volume_table,
}; };
static struct tumbler_mono_vol tumbler_treble_vol_info = { static struct tumbler_mono_vol tumbler_treble_vol_info = {
index: VOL_IDX_TREBLE, .index = VOL_IDX_TREBLE,
reg: TAS_REG_TREBLE, .reg = TAS_REG_TREBLE,
bytes: 1, .bytes = 1,
max: number_of(treble_volume_table), .max = number_of(treble_volume_table),
table: treble_volume_table, .table = treble_volume_table,
}; };
#define DEFINE_MONO(xname,type) { \ #define DEFINE_MONO(xname,type) { \
iface: SNDRV_CTL_ELEM_IFACE_MIXER,\ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,\
name: xname, \ .name = xname, \
info: tumbler_info_mono, \ .info = tumbler_info_mono, \
get: tumbler_get_mono, \ .get = tumbler_get_mono, \
put: tumbler_put_mono, \ .put = tumbler_put_mono, \
private_value: (unsigned long)(&tumbler_##type##_vol_info), \ .private_value = (unsigned long)(&tumbler_##type##_vol_info), \
} }
/* /*
...@@ -491,51 +491,51 @@ static int tumbler_put_mute_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_ ...@@ -491,51 +491,51 @@ static int tumbler_put_mute_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
/* /*
*/ */
static snd_kcontrol_new_t tumbler_mixers[] __initdata = { static snd_kcontrol_new_t tumbler_mixers[] __initdata = {
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Master Playback Volume", .name = "Master Playback Volume",
info: tumbler_info_master_volume, .info = tumbler_info_master_volume,
get: tumbler_get_master_volume, .get = tumbler_get_master_volume,
put: tumbler_put_master_volume put: tumbler_put_master_volume
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Master Playback Switch", .name = "Master Playback Switch",
info: snd_pmac_boolean_stereo_info, .info = snd_pmac_boolean_stereo_info,
get: tumbler_get_master_switch, .get = tumbler_get_master_switch,
put: tumbler_put_master_switch put: tumbler_put_master_switch
}, },
DEFINE_MONO("Tone Control - Bass", bass), DEFINE_MONO("Tone Control - Bass", bass),
DEFINE_MONO("Tone Control - Treble", treble), DEFINE_MONO("Tone Control - Treble", treble),
DEFINE_MONO("PCM Playback Volume", pcm), DEFINE_MONO("PCM Playback Volume", pcm),
// DEFINE_MONO("Mixer2 Playback Volume", altpcm), // DEFINE_MONO("Mixer2 Playback Volume", altpcm),
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "DRC Switch", .name = "DRC Switch",
info: snd_pmac_boolean_mono_info, .info = snd_pmac_boolean_mono_info,
get: tumbler_get_drc_switch, .get = tumbler_get_drc_switch,
put: tumbler_put_drc_switch put: tumbler_put_drc_switch
}, },
{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "DRC Range", .name = "DRC Range",
info: tumbler_info_drc_value, .info = tumbler_info_drc_value,
get: tumbler_get_drc_value, .get = tumbler_get_drc_value,
put: tumbler_put_drc_value put: tumbler_put_drc_value
}, },
}; };
static snd_kcontrol_new_t tumbler_hp_sw __initdata = { static snd_kcontrol_new_t tumbler_hp_sw __initdata = {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "Headphone Playback Switch", .name = "Headphone Playback Switch",
info: snd_pmac_boolean_mono_info, .info = snd_pmac_boolean_mono_info,
get: tumbler_get_mute_switch, .get = tumbler_get_mute_switch,
put: tumbler_put_mute_switch, .put = tumbler_put_mute_switch,
private_value: TUMBLER_MUTE_HP, .private_value = TUMBLER_MUTE_HP,
}; };
static snd_kcontrol_new_t tumbler_speaker_sw __initdata = { static snd_kcontrol_new_t tumbler_speaker_sw __initdata = {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "PC Speaker Playback Switch", .name = "PC Speaker Playback Switch",
info: snd_pmac_boolean_mono_info, .info = snd_pmac_boolean_mono_info,
get: tumbler_get_mute_switch, .get = tumbler_get_mute_switch,
put: tumbler_put_mute_switch, .put = tumbler_put_mute_switch,
private_value: TUMBLER_MUTE_AMP, .private_value = TUMBLER_MUTE_AMP,
}; };
#ifdef PMAC_SUPPORT_AUTOMUTE #ifdef PMAC_SUPPORT_AUTOMUTE
......
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