#define AWACS_VOLUME(xname, xreg, xshift) \
-{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
- info: snd_pmac_awacs_info_volume, \
- get: snd_pmac_awacs_get_volume, \
- put: snd_pmac_awacs_put_volume, \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
+ .info = snd_pmac_awacs_info_volume, \
+ .get = snd_pmac_awacs_get_volume, \
+ .put = snd_pmac_awacs_put_volume, \
private_value: (xreg) | ((xshift) << 8) }
/*
}
#define AWACS_SWITCH(xname, xreg, xshift, xinvert) \
-{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
- info: snd_pmac_boolean_mono_info, \
- get: snd_pmac_awacs_get_switch, \
- put: snd_pmac_awacs_put_switch, \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: 0, \
+ .info = snd_pmac_boolean_mono_info, \
+ .get = snd_pmac_awacs_get_switch, \
+ .put = snd_pmac_awacs_put_switch, \
private_value: (xreg) | ((xshift) << 8) | ((xinvert) << 16) }
#define AMP_CH_HD 1
static snd_kcontrol_new_t snd_pmac_awacs_amp_vol[] __initdata = {
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "PC Speaker Playback Volume",
- info: snd_pmac_awacs_info_volume_amp,
- get: snd_pmac_awacs_get_volume_amp,
- put: snd_pmac_awacs_put_volume_amp,
- private_value: AMP_CH_SPK,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "PC Speaker Playback Volume",
+ .info = snd_pmac_awacs_info_volume_amp,
+ .get = snd_pmac_awacs_get_volume_amp,
+ .put = snd_pmac_awacs_put_volume_amp,
+ .private_value = AMP_CH_SPK,
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Headphone Playback Volume",
- info: snd_pmac_awacs_info_volume_amp,
- get: snd_pmac_awacs_get_volume_amp,
- put: snd_pmac_awacs_put_volume_amp,
- private_value: AMP_CH_HD,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Headphone Playback Volume",
+ .info = snd_pmac_awacs_info_volume_amp,
+ .get = snd_pmac_awacs_get_volume_amp,
+ .put = snd_pmac_awacs_put_volume_amp,
+ .private_value = AMP_CH_HD,
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Tone Control - Bass",
- info: snd_pmac_awacs_info_tone_amp,
- get: snd_pmac_awacs_get_tone_amp,
- put: snd_pmac_awacs_put_tone_amp,
- private_value: 0,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Tone Control - Bass",
+ .info = snd_pmac_awacs_info_tone_amp,
+ .get = snd_pmac_awacs_get_tone_amp,
+ .put = snd_pmac_awacs_put_tone_amp,
+ .private_value = 0,
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Tone Control - Treble",
- info: snd_pmac_awacs_info_tone_amp,
- get: snd_pmac_awacs_get_tone_amp,
- put: snd_pmac_awacs_put_tone_amp,
- private_value: 1,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Tone Control - Treble",
+ .info = snd_pmac_awacs_info_tone_amp,
+ .get = snd_pmac_awacs_get_tone_amp,
+ .put = snd_pmac_awacs_put_tone_amp,
+ .private_value = 1,
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Amp Master Playback Volume",
- info: snd_pmac_awacs_info_master_amp,
- get: snd_pmac_awacs_get_master_amp,
- put: snd_pmac_awacs_put_master_amp,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Amp Master Playback Volume",
+ .info = snd_pmac_awacs_info_master_amp,
+ .get = snd_pmac_awacs_get_master_amp,
+ .put = snd_pmac_awacs_put_master_amp,
},
};
static snd_kcontrol_new_t snd_pmac_awacs_amp_hp_sw __initdata = {
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Headphone Playback Switch",
- info: snd_pmac_boolean_stereo_info,
- get: snd_pmac_awacs_get_switch_amp,
- put: snd_pmac_awacs_put_switch_amp,
- private_value: AMP_CH_HD,
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Headphone Playback Switch",
+ .info = snd_pmac_boolean_stereo_info,
+ .get = snd_pmac_awacs_get_switch_amp,
+ .put = snd_pmac_awacs_put_switch_amp,
+ .private_value = AMP_CH_HD,
};
static snd_kcontrol_new_t snd_pmac_awacs_amp_spk_sw __initdata = {
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "PC Speaker Playback Switch",
- info: snd_pmac_boolean_stereo_info,
- get: snd_pmac_awacs_get_switch_amp,
- put: snd_pmac_awacs_put_switch_amp,
- private_value: AMP_CH_SPK,
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "PC Speaker Playback Switch",
+ .info = snd_pmac_boolean_stereo_info,
+ .get = snd_pmac_awacs_get_switch_amp,
+ .put = snd_pmac_awacs_put_switch_amp,
+ .private_value = AMP_CH_SPK,
};
#endif /* PMAC_AMP_AVAIL */
};
static snd_kcontrol_new_t snd_pmac_screamer_mic_boost[] __initdata = {
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Mic Boost",
- info: snd_pmac_screamer_mic_boost_info,
- get: snd_pmac_screamer_mic_boost_get,
- put: snd_pmac_screamer_mic_boost_put,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Mic Boost",
+ .info = snd_pmac_screamer_mic_boost_info,
+ .get = snd_pmac_screamer_mic_boost_get,
+ .put = snd_pmac_screamer_mic_boost_put,
},
};
}
#define BURGUNDY_VOLUME(xname, xindex, addr, shift) \
-{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
- info: snd_pmac_burgundy_info_volume,\
- get: snd_pmac_burgundy_get_volume,\
- put: snd_pmac_burgundy_put_volume,\
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
+ .info = snd_pmac_burgundy_info_volume,\
+ .get = snd_pmac_burgundy_get_volume,\
+ .put = snd_pmac_burgundy_put_volume,\
private_value: ((ADDR2BASE(addr) & 0xff) | ((shift) << 8)) }
/* lineout/speaker */
}
#define BURGUNDY_OUTPUT_SWITCH(xname, xindex, lmask, rmask, stereo) \
-{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
- info: snd_pmac_burgundy_info_switch_out,\
- get: snd_pmac_burgundy_get_switch_out,\
- put: snd_pmac_burgundy_put_switch_out,\
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
+ .info = snd_pmac_burgundy_info_switch_out,\
+ .get = snd_pmac_burgundy_get_switch_out,\
+ .put = snd_pmac_burgundy_put_switch_out,\
private_value: ((lmask) | ((rmask) << 8) | ((stereo) << 24)) }
/* line/speaker output volume */
}
#define BURGUNDY_OUTPUT_VOLUME(xname, xindex, addr, stereo) \
-{ iface: SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
- info: snd_pmac_burgundy_info_volume_out,\
- get: snd_pmac_burgundy_get_volume_out,\
- put: snd_pmac_burgundy_put_volume_out,\
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, name: xname, index: xindex,\
+ .info = snd_pmac_burgundy_info_volume_out,\
+ .get = snd_pmac_burgundy_get_volume_out,\
+ .put = snd_pmac_burgundy_put_volume_out,\
private_value: (ADDR2BASE(addr) | ((stereo) << 24)) }
static snd_kcontrol_new_t snd_pmac_burgundy_mixers[] __initdata = {
}
static snd_kcontrol_new_t daca_mixers[] = {
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Deemphasis Switch",
- info: daca_info_deemphasis,
- get: daca_get_deemphasis,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Deemphasis Switch",
+ .info = daca_info_deemphasis,
+ .get = daca_get_deemphasis,
put: daca_put_deemphasis
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Master Playback Volume",
- info: daca_info_volume,
- get: daca_get_volume,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Master Playback Volume",
+ .info = daca_info_volume,
+ .get = daca_get_volume,
put: daca_put_volume
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Power Amplifier Switch",
- info: daca_info_amp,
- get: daca_get_amp,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Power Amplifier Switch",
+ .info = daca_info_amp,
+ .get = daca_get_amp,
put: daca_put_amp
},
};
static int keywest_detach_client(struct i2c_client *client);
struct i2c_driver keywest_driver = {
- name: "PMac Keywest Audio",
- id: I2C_DRIVERID_KEYWEST,
- flags: I2C_DF_NOTIFY,
- attach_adapter: &keywest_attach_adapter,
- detach_client: &keywest_detach_client,
+ .name = "PMac Keywest Audio",
+ .id = I2C_DRIVERID_KEYWEST,
+ .flags = I2C_DF_NOTIFY,
+ .attach_adapter = &keywest_attach_adapter,
+ .detach_client = &keywest_detach_client,
};
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_RESUME),
- formats: SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
- rates: SNDRV_PCM_RATE_8000_44100,
- rate_min: 7350,
- rate_max: 44100,
- channels_min: 2,
- channels_max: 2,
- buffer_bytes_max: 32768,
- period_bytes_min: 256,
- period_bytes_max: 16384,
- periods_min: 1,
- periods_max: PMAC_MAX_FRAGS,
+ .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_8000_44100,
+ .rate_min = 7350,
+ .rate_max = 44100,
+ .channels_min = 2,
+ .channels_max = 2,
+ .buffer_bytes_max = 32768,
+ .period_bytes_min = 256,
+ .period_bytes_max = 16384,
+ .periods_min = 1,
+ .periods_max = PMAC_MAX_FRAGS,
};
static snd_pcm_hardware_t snd_pmac_capture =
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_RESUME),
- formats: SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
- rates: SNDRV_PCM_RATE_8000_44100,
- rate_min: 7350,
- rate_max: 44100,
- channels_min: 2,
- channels_max: 2,
- buffer_bytes_max: 32768,
- period_bytes_min: 256,
- period_bytes_max: 16384,
- periods_min: 1,
- periods_max: PMAC_MAX_FRAGS,
+ .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_8000_44100,
+ .rate_min = 7350,
+ .rate_max = 44100,
+ .channels_min = 2,
+ .channels_max = 2,
+ .buffer_bytes_max = 32768,
+ .period_bytes_min = 256,
+ .period_bytes_max = 16384,
+ .periods_min = 1,
+ .periods_max = PMAC_MAX_FRAGS,
};
*/
static snd_pcm_ops_t snd_pmac_playback_ops = {
- open: snd_pmac_playback_open,
- close: snd_pmac_playback_close,
- ioctl: snd_pcm_lib_ioctl,
- hw_params: snd_pmac_pcm_hw_params,
- hw_free: snd_pmac_pcm_hw_free,
- prepare: snd_pmac_playback_prepare,
- trigger: snd_pmac_playback_trigger,
- pointer: snd_pmac_playback_pointer,
+ .open = snd_pmac_playback_open,
+ .close = snd_pmac_playback_close,
+ .ioctl = snd_pcm_lib_ioctl,
+ .hw_params = snd_pmac_pcm_hw_params,
+ .hw_free = snd_pmac_pcm_hw_free,
+ .prepare = snd_pmac_playback_prepare,
+ .trigger = snd_pmac_playback_trigger,
+ .pointer = snd_pmac_playback_pointer,
};
static snd_pcm_ops_t snd_pmac_capture_ops = {
- open: snd_pmac_capture_open,
- close: snd_pmac_capture_close,
- ioctl: snd_pcm_lib_ioctl,
- hw_params: snd_pmac_pcm_hw_params,
- hw_free: snd_pmac_pcm_hw_free,
- prepare: snd_pmac_capture_prepare,
- trigger: snd_pmac_capture_trigger,
- pointer: snd_pmac_capture_pointer,
+ .open = snd_pmac_capture_open,
+ .close = snd_pmac_capture_close,
+ .ioctl = snd_pcm_lib_ioctl,
+ .hw_params = snd_pmac_pcm_hw_params,
+ .hw_free = snd_pmac_pcm_hw_free,
+ .prepare = snd_pmac_capture_prepare,
+ .trigger = snd_pmac_capture_trigger,
+ .pointer = snd_pmac_capture_pointer,
};
static void pmac_pcm_free(snd_pcm_t *pcm)
}
static snd_kcontrol_new_t snd_pmac_beep_mixer = {
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Beep Playback Volume",
- index: 0,
- info: snd_pmac_info_beep,
- get: snd_pmac_get_beep,
- put: snd_pmac_put_beep,
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Beep Playback Volume",
+ .index = 0,
+ .info = snd_pmac_info_beep,
+ .get = snd_pmac_get_beep,
+ .put = snd_pmac_put_beep,
};
static void snd_pmac_beep_free(snd_kcontrol_t *control)
}
static snd_kcontrol_new_t auto_mute_controls[] __initdata = {
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Auto Mute Switch",
- info: snd_pmac_boolean_mono_info,
- get: pmac_auto_mute_get,
- put: pmac_auto_mute_put,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Auto Mute Switch",
+ .info = snd_pmac_boolean_mono_info,
+ .get = pmac_auto_mute_get,
+ .put = pmac_auto_mute_put,
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Headphone Detection",
- access: SNDRV_CTL_ELEM_ACCESS_READ,
- info: snd_pmac_boolean_mono_info,
- get: pmac_hp_detect_get,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Headphone Detection",
+ .access = SNDRV_CTL_ELEM_ACCESS_READ,
+ .info = snd_pmac_boolean_mono_info,
+ .get = pmac_hp_detect_get,
},
};
struct device_node *np;
int i, err;
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);
}
static struct tumbler_mono_vol tumbler_pcm_vol_info = {
- index: VOL_IDX_PCM,
- reg: TAS_REG_PCM,
- bytes: 3,
- max: number_of(mixer_volume_table),
- table: mixer_volume_table,
+ .index = VOL_IDX_PCM,
+ .reg = TAS_REG_PCM,
+ .bytes = 3,
+ .max = number_of(mixer_volume_table),
+ .table = mixer_volume_table,
};
#if 0 // for what?
static struct tumbler_mono_vol tumbler_altpcm_vol_info = {
- index: VOL_IDX_ALTPCM,
- reg: TAS_REG_INPUT2,
- bytes: 3,
- max: number_of(mixer_volume_table),
- table: mixer_volume_table,
+ .index = VOL_IDX_ALTPCM,
+ .reg = TAS_REG_INPUT2,
+ .bytes = 3,
+ .max = number_of(mixer_volume_table),
+ .table = mixer_volume_table,
};
#endif
static struct tumbler_mono_vol tumbler_bass_vol_info = {
- index: VOL_IDX_BASS,
- reg: TAS_REG_BASS,
- bytes: 1,
- max: number_of(bass_volume_table),
- table: bass_volume_table,
+ .index = VOL_IDX_BASS,
+ .reg = TAS_REG_BASS,
+ .bytes = 1,
+ .max = number_of(bass_volume_table),
+ .table = bass_volume_table,
};
static struct tumbler_mono_vol tumbler_treble_vol_info = {
- index: VOL_IDX_TREBLE,
- reg: TAS_REG_TREBLE,
- bytes: 1,
- max: number_of(treble_volume_table),
- table: treble_volume_table,
+ .index = VOL_IDX_TREBLE,
+ .reg = TAS_REG_TREBLE,
+ .bytes = 1,
+ .max = number_of(treble_volume_table),
+ .table = treble_volume_table,
};
#define DEFINE_MONO(xname,type) { \
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,\
- name: xname, \
- info: tumbler_info_mono, \
- get: tumbler_get_mono, \
- put: tumbler_put_mono, \
- private_value: (unsigned long)(&tumbler_##type##_vol_info), \
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,\
+ .name = xname, \
+ .info = tumbler_info_mono, \
+ .get = tumbler_get_mono, \
+ .put = tumbler_put_mono, \
+ .private_value = (unsigned long)(&tumbler_##type##_vol_info), \
}
/*
/*
*/
static snd_kcontrol_new_t tumbler_mixers[] __initdata = {
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Master Playback Volume",
- info: tumbler_info_master_volume,
- get: tumbler_get_master_volume,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Master Playback Volume",
+ .info = tumbler_info_master_volume,
+ .get = tumbler_get_master_volume,
put: tumbler_put_master_volume
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Master Playback Switch",
- info: snd_pmac_boolean_stereo_info,
- get: tumbler_get_master_switch,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Master Playback Switch",
+ .info = snd_pmac_boolean_stereo_info,
+ .get = tumbler_get_master_switch,
put: tumbler_put_master_switch
},
DEFINE_MONO("Tone Control - Bass", bass),
DEFINE_MONO("Tone Control - Treble", treble),
DEFINE_MONO("PCM Playback Volume", pcm),
// DEFINE_MONO("Mixer2 Playback Volume", altpcm),
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "DRC Switch",
- info: snd_pmac_boolean_mono_info,
- get: tumbler_get_drc_switch,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "DRC Switch",
+ .info = snd_pmac_boolean_mono_info,
+ .get = tumbler_get_drc_switch,
put: tumbler_put_drc_switch
},
- { iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "DRC Range",
- info: tumbler_info_drc_value,
- get: tumbler_get_drc_value,
+ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "DRC Range",
+ .info = tumbler_info_drc_value,
+ .get = tumbler_get_drc_value,
put: tumbler_put_drc_value
},
};
static snd_kcontrol_new_t tumbler_hp_sw __initdata = {
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "Headphone Playback Switch",
- info: snd_pmac_boolean_mono_info,
- get: tumbler_get_mute_switch,
- put: tumbler_put_mute_switch,
- private_value: TUMBLER_MUTE_HP,
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "Headphone Playback Switch",
+ .info = snd_pmac_boolean_mono_info,
+ .get = tumbler_get_mute_switch,
+ .put = tumbler_put_mute_switch,
+ .private_value = TUMBLER_MUTE_HP,
};
static snd_kcontrol_new_t tumbler_speaker_sw __initdata = {
- iface: SNDRV_CTL_ELEM_IFACE_MIXER,
- name: "PC Speaker Playback Switch",
- info: snd_pmac_boolean_mono_info,
- get: tumbler_get_mute_switch,
- put: tumbler_put_mute_switch,
- private_value: TUMBLER_MUTE_AMP,
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ .name = "PC Speaker Playback Switch",
+ .info = snd_pmac_boolean_mono_info,
+ .get = tumbler_get_mute_switch,
+ .put = tumbler_put_mute_switch,
+ .private_value = TUMBLER_MUTE_AMP,
};
#ifdef PMAC_SUPPORT_AUTOMUTE