···3030/*3131 * write a codec data (24bit)3232 */3333-static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)3333+static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)3434{3535 unsigned long flags;3636···4747/*4848 * Data type used to access the Codec4949 */5050-typedef union {5050+union vx_codec_data {5151 u32 l;5252#ifdef SNDRV_BIG_ENDIAN5353 struct w {···7272 u8 hh;7373 } b;7474#endif7575-} vx_codec_data_t;7575+};76767777#define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s))7878#define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r))···8585 * @reg: register index8686 * @val: data value8787 */8888-static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val)8888+static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val)8989{9090- vx_codec_data_t data;9090+ union vx_codec_data data;9191 /* DAC control register */9292 SET_CDC_DATA_INIT(data);9393 SET_CDC_DATA_REG(data, reg);···102102 * @left: left output level, 0 = mute103103 * @right: right output level104104 */105105-static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right)105105+static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right)106106{107107 left = chip->hw->output_level_max - left;108108 right = chip->hw->output_level_max - right;···126126#define DAC_ATTEN_MIN 0x08127127#define DAC_ATTEN_MAX 0x38128128129129-void vx_toggle_dac_mute(vx_core_t *chip, int mute)129129+void vx_toggle_dac_mute(struct vx_core *chip, int mute)130130{131131 unsigned int i;132132 for (i = 0; i < chip->hw->num_codecs; i++) {···141141/*142142 * vx_reset_codec - reset and initialize the codecs143143 */144144-void vx_reset_codec(vx_core_t *chip, int cold_reset)144144+void vx_reset_codec(struct vx_core *chip, int cold_reset)145145{146146 unsigned int i;147147 int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65;···175175 * change the audio input source176176 * @src: the target source (VX_AUDIO_SRC_XXX)177177 */178178-static void vx_change_audio_source(vx_core_t *chip, int src)178178+static void vx_change_audio_source(struct vx_core *chip, int src)179179{180180 unsigned long flags;181181···192192 * change the audio source if necessary and possible193193 * returns 1 if the source is actually changed.194194 */195195-int vx_sync_audio_source(vx_core_t *chip)195195+int vx_sync_audio_source(struct vx_core *chip)196196{197197 if (chip->audio_source_target == chip->audio_source ||198198 chip->pcm_running)···217217 short monitor_level;218218};219219220220-static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture,220220+static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture,221221 struct vx_audio_level *info)222222{223223 struct vx_rmh rmh;···256256257257258258#if 0 // not used259259-static int vx_read_audio_level(vx_core_t *chip, int audio, int capture,259259+static int vx_read_audio_level(struct vx_core *chip, int audio, int capture,260260 struct vx_audio_level *info)261261{262262 int err;···283283 * set the monitoring level and mute state of the given audio284284 * no more static, because must be called from vx_pcm to demute monitoring285285 */286286-int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active)286286+int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active)287287{288288 struct vx_audio_level info;289289···301301/*302302 * set the mute status of the given audio303303 */304304-static int vx_set_audio_switch(vx_core_t *chip, int audio, int active)304304+static int vx_set_audio_switch(struct vx_core *chip, int audio, int active)305305{306306 struct vx_audio_level info;307307···315315/*316316 * set the mute status of the given audio317317 */318318-static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level)318318+static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level)319319{320320 struct vx_audio_level info;321321···329329/*330330 * reset all audio levels331331 */332332-static void vx_reset_audio_levels(vx_core_t *chip)332332+static void vx_reset_audio_levels(struct vx_core *chip)333333{334334 unsigned int i, c;335335 struct vx_audio_level info;···375375 * @capture: 0 = playback, 1 = capture operation376376 * @info: the array of vx_vu_meter records (size = 2).377377 */378378-static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info)378378+static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info)379379{380380 struct vx_rmh rmh;381381 int i, err;···413413/*414414 * output level control415415 */416416-static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)416416+static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)417417{418418- vx_core_t *chip = snd_kcontrol_chip(kcontrol);418418+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);419419 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;420420 uinfo->count = 2;421421 uinfo->value.integer.min = 0;···423423 return 0;424424}425425426426-static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)426426+static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)427427{428428- vx_core_t *chip = snd_kcontrol_chip(kcontrol);428428+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);429429 int codec = kcontrol->id.index;430430 down(&chip->mixer_mutex);431431 ucontrol->value.integer.value[0] = chip->output_level[codec][0];···434434 return 0;435435}436436437437-static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)437437+static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)438438{439439- vx_core_t *chip = snd_kcontrol_chip(kcontrol);439439+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);440440 int codec = kcontrol->id.index;441441 down(&chip->mixer_mutex);442442 if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] ||···453453 return 0;454454}455455456456-static snd_kcontrol_new_t vx_control_output_level = {456456+static struct snd_kcontrol_new vx_control_output_level = {457457 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,458458 .name = "Master Playback Volume",459459 .info = vx_output_level_info,···464464/*465465 * audio source select466466 */467467-static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)467467+static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)468468{469469 static char *texts_mic[3] = {470470 "Digital", "Line", "Mic"···472472 static char *texts_vx2[2] = {473473 "Digital", "Analog"474474 };475475- vx_core_t *chip = snd_kcontrol_chip(kcontrol);475475+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);476476477477 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;478478 uinfo->count = 1;···492492 return 0;493493}494494495495-static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)495495+static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)496496{497497- vx_core_t *chip = snd_kcontrol_chip(kcontrol);497497+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);498498 ucontrol->value.enumerated.item[0] = chip->audio_source_target;499499 return 0;500500}501501502502-static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)502502+static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)503503{504504- vx_core_t *chip = snd_kcontrol_chip(kcontrol);504504+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);505505 down(&chip->mixer_mutex);506506 if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) {507507 chip->audio_source_target = ucontrol->value.enumerated.item[0];···513513 return 0;514514}515515516516-static snd_kcontrol_new_t vx_control_audio_src = {516516+static struct snd_kcontrol_new vx_control_audio_src = {517517 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,518518 .name = "Capture Source",519519 .info = vx_audio_src_info,···524524/*525525 * clock mode selection526526 */527527-static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)527527+static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)528528{529529 static char *texts[3] = {530530 "Auto", "Internal", "External"···540540 return 0;541541}542542543543-static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)543543+static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)544544{545545- vx_core_t *chip = snd_kcontrol_chip(kcontrol);545545+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);546546 ucontrol->value.enumerated.item[0] = chip->clock_mode;547547 return 0;548548}549549550550-static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)550550+static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)551551{552552- vx_core_t *chip = snd_kcontrol_chip(kcontrol);552552+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);553553 down(&chip->mixer_mutex);554554 if (chip->clock_mode != ucontrol->value.enumerated.item[0]) {555555 chip->clock_mode = ucontrol->value.enumerated.item[0];···561561 return 0;562562}563563564564-static snd_kcontrol_new_t vx_control_clock_mode = {564564+static struct snd_kcontrol_new vx_control_clock_mode = {565565 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,566566 .name = "Clock Mode",567567 .info = vx_clock_mode_info,···572572/*573573 * Audio Gain574574 */575575-static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)575575+static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)576576{577577 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;578578 uinfo->count = 2;···581581 return 0;582582}583583584584-static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)584584+static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)585585{586586- vx_core_t *chip = snd_kcontrol_chip(kcontrol);586586+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);587587 int audio = kcontrol->private_value & 0xff;588588 int capture = (kcontrol->private_value >> 8) & 1;589589···594594 return 0;595595}596596597597-static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)597597+static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)598598{599599- vx_core_t *chip = snd_kcontrol_chip(kcontrol);599599+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);600600 int audio = kcontrol->private_value & 0xff;601601 int capture = (kcontrol->private_value >> 8) & 1;602602···612612 return 0;613613}614614615615-static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)615615+static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)616616{617617- vx_core_t *chip = snd_kcontrol_chip(kcontrol);617617+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);618618 int audio = kcontrol->private_value & 0xff;619619620620 down(&chip->mixer_mutex);···624624 return 0;625625}626626627627-static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)627627+static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)628628{629629- vx_core_t *chip = snd_kcontrol_chip(kcontrol);629629+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);630630 int audio = kcontrol->private_value & 0xff;631631632632 down(&chip->mixer_mutex);···643643 return 0;644644}645645646646-static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)646646+static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)647647{648648 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;649649 uinfo->count = 2;···652652 return 0;653653}654654655655-static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)655655+static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)656656{657657- vx_core_t *chip = snd_kcontrol_chip(kcontrol);657657+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);658658 int audio = kcontrol->private_value & 0xff;659659660660 down(&chip->mixer_mutex);···664664 return 0;665665}666666667667-static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)667667+static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)668668{669669- vx_core_t *chip = snd_kcontrol_chip(kcontrol);669669+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);670670 int audio = kcontrol->private_value & 0xff;671671672672 down(&chip->mixer_mutex);···681681 return 0;682682}683683684684-static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)684684+static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)685685{686686- vx_core_t *chip = snd_kcontrol_chip(kcontrol);686686+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);687687 int audio = kcontrol->private_value & 0xff;688688689689 down(&chip->mixer_mutex);···693693 return 0;694694}695695696696-static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)696696+static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)697697{698698- vx_core_t *chip = snd_kcontrol_chip(kcontrol);698698+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);699699 int audio = kcontrol->private_value & 0xff;700700701701 down(&chip->mixer_mutex);···712712 return 0;713713}714714715715-static snd_kcontrol_new_t vx_control_audio_gain = {715715+static struct snd_kcontrol_new vx_control_audio_gain = {716716 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,717717 /* name will be filled later */718718 .info = vx_audio_gain_info,719719 .get = vx_audio_gain_get,720720 .put = vx_audio_gain_put721721};722722-static snd_kcontrol_new_t vx_control_output_switch = {722722+static struct snd_kcontrol_new vx_control_output_switch = {723723 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,724724 .name = "PCM Playback Switch",725725 .info = vx_audio_sw_info,726726 .get = vx_audio_sw_get,727727 .put = vx_audio_sw_put728728};729729-static snd_kcontrol_new_t vx_control_monitor_gain = {729729+static struct snd_kcontrol_new vx_control_monitor_gain = {730730 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,731731 .name = "Monitoring Volume",732732 .info = vx_audio_gain_info, /* shared */733733 .get = vx_audio_monitor_get,734734 .put = vx_audio_monitor_put735735};736736-static snd_kcontrol_new_t vx_control_monitor_switch = {736736+static struct snd_kcontrol_new vx_control_monitor_switch = {737737 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,738738 .name = "Monitoring Switch",739739 .info = vx_audio_sw_info, /* shared */···745745/*746746 * IEC958 status bits747747 */748748-static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)748748+static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)749749{750750 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;751751 uinfo->count = 1;752752 return 0;753753}754754755755-static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)755755+static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)756756{757757- vx_core_t *chip = snd_kcontrol_chip(kcontrol);757757+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);758758759759 down(&chip->mixer_mutex);760760 ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff;···765765 return 0;766766}767767768768-static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)768768+static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)769769{770770 ucontrol->value.iec958.status[0] = 0xff;771771 ucontrol->value.iec958.status[1] = 0xff;···774774 return 0;775775}776776777777-static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)777777+static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)778778{779779- vx_core_t *chip = snd_kcontrol_chip(kcontrol);779779+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);780780 unsigned int val;781781782782 val = (ucontrol->value.iec958.status[0] << 0) |···794794 return 0;795795}796796797797-static snd_kcontrol_new_t vx_control_iec958_mask = {797797+static struct snd_kcontrol_new vx_control_iec958_mask = {798798 .access = SNDRV_CTL_ELEM_ACCESS_READ,799799 .iface = SNDRV_CTL_ELEM_IFACE_PCM,800800 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),···802802 .get = vx_iec958_mask_get,803803};804804805805-static snd_kcontrol_new_t vx_control_iec958 = {805805+static struct snd_kcontrol_new vx_control_iec958 = {806806 .iface = SNDRV_CTL_ELEM_IFACE_PCM,807807 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),808808 .info = vx_iec958_info,···818818#define METER_MAX 0xff819819#define METER_SHIFT 16820820821821-static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)821821+static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)822822{823823 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;824824 uinfo->count = 2;···827827 return 0;828828}829829830830-static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)830830+static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)831831{832832- vx_core_t *chip = snd_kcontrol_chip(kcontrol);832832+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);833833 struct vx_vu_meter meter[2];834834 int audio = kcontrol->private_value & 0xff;835835 int capture = (kcontrol->private_value >> 8) & 1;···840840 return 0;841841}842842843843-static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)843843+static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)844844{845845- vx_core_t *chip = snd_kcontrol_chip(kcontrol);845845+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);846846 struct vx_vu_meter meter[2];847847 int audio = kcontrol->private_value & 0xff;848848 int capture = (kcontrol->private_value >> 8) & 1;···853853 return 0;854854}855855856856-static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)856856+static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)857857{858858 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;859859 uinfo->count = 2;···862862 return 0;863863}864864865865-static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)865865+static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)866866{867867- vx_core_t *chip = snd_kcontrol_chip(kcontrol);867867+ struct vx_core *chip = snd_kcontrol_chip(kcontrol);868868 struct vx_vu_meter meter[2];869869 int audio = kcontrol->private_value & 0xff;870870···874874 return 0;875875}876876877877-static snd_kcontrol_new_t vx_control_vu_meter = {877877+static struct snd_kcontrol_new vx_control_vu_meter = {878878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,879879 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,880880 /* name will be filled later */···882882 .get = vx_vu_meter_get,883883};884884885885-static snd_kcontrol_new_t vx_control_peak_meter = {885885+static struct snd_kcontrol_new vx_control_peak_meter = {886886 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,887887 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,888888 /* name will be filled later */···890890 .get = vx_peak_meter_get,891891};892892893893-static snd_kcontrol_new_t vx_control_saturation = {893893+static struct snd_kcontrol_new vx_control_saturation = {894894 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,895895 .name = "Input Saturation",896896 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,···904904 *905905 */906906907907-int snd_vx_mixer_new(vx_core_t *chip)907907+int snd_vx_mixer_new(struct vx_core *chip)908908{909909 unsigned int i, c;910910 int err;911911- snd_kcontrol_new_t temp;912912- snd_card_t *card = chip->card;911911+ struct snd_kcontrol_new temp;912912+ struct snd_card *card = chip->card;913913 char name[32];914914915915 strcpy(card->mixername, card->driver);
+110-90
sound/drivers/vx/vx_pcm.c
···6161 */62626363/* get the physical page pointer on the given offset */6464-static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset)6464+static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,6565+ unsigned long offset)6566{6667 void *pageptr = subs->runtime->dma_area + offset;6768 return vmalloc_to_page(pageptr);···7372 * called from hw_params7473 * NOTE: this may be called not only once per pcm open!7574 */7676-static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size)7575+static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)7776{7878- snd_pcm_runtime_t *runtime = subs->runtime;7777+ struct snd_pcm_runtime *runtime = subs->runtime;7978 if (runtime->dma_area) {8079 /* already allocated */8180 if (runtime->dma_bytes >= size)···9594 * called from hw_free callback9695 * NOTE: this may be called not only once per pcm open!9796 */9898-static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs)9797+static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)9998{100100- snd_pcm_runtime_t *runtime = subs->runtime;9999+ struct snd_pcm_runtime *runtime = subs->runtime;101100 if (runtime->dma_area) {102101 vfree(runtime->dma_area);103102 runtime->dma_area = NULL;···109108/*110109 * read three pending pcm bytes via inb()111110 */112112-static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe)111111+static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime,112112+ struct vx_pipe *pipe)113113{114114 int offset = pipe->hw_ptr;115115 unsigned char *buf = (unsigned char *)(runtime->dma_area + offset);···137135 * @pc_time: the pointer for the PC-time to set138136 * @dsp_time: the pointer for RMH status time array139137 */140140-static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time)138138+static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time,139139+ unsigned int *dsp_time)141140{142141 dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK;143142 dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD;···154151 *155152 * returns the increase of the command length.156153 */157157-static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe)154154+static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh,155155+ struct vx_pipe *pipe)158156{159157 /* Update The length added to the RMH command by the timestamp */160158 if (! (pipe->differed_type & DC_DIFFERED_DELAY))···188184 * @pipe: the affected pipe189185 * @data: format bitmask190186 */191191-static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data)187187+static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe,188188+ unsigned int data)192189{193190 struct vx_rmh rmh;194191···215210 *216211 * returns 0 if successful, or a negative error code.217212 */218218-static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe,219219- snd_pcm_runtime_t *runtime)213213+static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe,214214+ struct snd_pcm_runtime *runtime)220215{221216 unsigned int header = HEADER_FMT_BASE;222217···244239/*245240 * set / query the IBL size246241 */247247-static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info)242242+static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info)248243{249244 int err;250245 struct vx_rmh rmh;···274269 *275270 * called from trigger callback only276271 */277277-static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state)272272+static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state)278273{279274 int err;280275 struct vx_rmh rmh;···299294 * you'll need to disconnect the host to get back to the300295 * normal mode.301296 */302302-static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe)297297+static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe)303298{304299 int result;305300 struct vx_rmh rmh;···323318 *324319 * called from trigger callback only325320 */326326-static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe)321321+static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe)327322{328323 int err;329324 struct vx_rmh rmh;···344339 * vx_conf_pipe - tell the pipe to stand by and wait for IRQA.345340 * @pipe: the pipe to be configured346341 */347347-static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe)342342+static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe)348343{349344 struct vx_rmh rmh;350345···358353/*359354 * vx_send_irqa - trigger IRQA360355 */361361-static int vx_send_irqa(vx_core_t *chip)356356+static int vx_send_irqa(struct vx_core *chip)362357{363358 struct vx_rmh rmh;364359···383378 * called from trigger callback only384379 *385380 */386386-static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state)381381+static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state)387382{388383 int err, i, cur_state;389384···436431 *437432 * called from trigger callback only438433 */439439-static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe)434434+static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe)440435{441436 struct vx_rmh rmh;442437 vx_init_rmh(&rmh, CMD_STOP_PIPE);···454449 *455450 * return 0 on success, or a negative error code.456451 */457457-static int vx_alloc_pipe(vx_core_t *chip, int capture,452452+static int vx_alloc_pipe(struct vx_core *chip, int capture,458453 int audioid, int num_audio,459459- vx_pipe_t **pipep)454454+ struct vx_pipe **pipep)460455{461456 int err;462462- vx_pipe_t *pipe;457457+ struct vx_pipe *pipe;463458 struct vx_rmh rmh;464459 int data_mode;465460···504499 * vx_free_pipe - release a pipe505500 * @pipe: pipe to be released506501 */507507-static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe)502502+static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe)508503{509504 struct vx_rmh rmh;510505···522517 *523518 * called from trigger callback only524519 */525525-static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe)520520+static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe)526521{527522 struct vx_rmh rmh;528523···538533 *539534 * called from trigger callback only540535 */541541-static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe)536536+static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe)542537{543538 struct vx_rmh rmh;544539···552547 * playback hw information553548 */554549555555-static snd_pcm_hardware_t vx_pcm_playback_hw = {550550+static struct snd_pcm_hardware vx_pcm_playback_hw = {556551 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |557552 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/558553 /*SNDRV_PCM_INFO_RESUME*/),559559- .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,554554+ .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/555555+ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),560556 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,561557 .rate_min = 5000,562558 .rate_max = 48000,···577571/*578572 * vx_pcm_playback_open - open callback for playback579573 */580580-static int vx_pcm_playback_open(snd_pcm_substream_t *subs)574574+static int vx_pcm_playback_open(struct snd_pcm_substream *subs)581575{582582- snd_pcm_runtime_t *runtime = subs->runtime;583583- vx_core_t *chip = snd_pcm_substream_chip(subs);584584- vx_pipe_t *pipe = NULL;576576+ struct snd_pcm_runtime *runtime = subs->runtime;577577+ struct vx_core *chip = snd_pcm_substream_chip(subs);578578+ struct vx_pipe *pipe = NULL;585579 unsigned int audio;586580 int err;587581···621615/*622616 * vx_pcm_playback_close - close callback for playback623617 */624624-static int vx_pcm_playback_close(snd_pcm_substream_t *subs)618618+static int vx_pcm_playback_close(struct snd_pcm_substream *subs)625619{626626- vx_core_t *chip = snd_pcm_substream_chip(subs);627627- vx_pipe_t *pipe;620620+ struct vx_core *chip = snd_pcm_substream_chip(subs);621621+ struct vx_pipe *pipe;628622629623 if (! subs->runtime->private_data)630624 return -EINVAL;···647641 *648642 * NB: call with a certain lock.649643 */650650-static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe)644644+static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe)651645{652646 int err;653647 struct vx_rmh rmh; /* use a temporary rmh here */···675669 *676670 * return 0 if ok.677671 */678678-static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size)672672+static int vx_pcm_playback_transfer_chunk(struct vx_core *chip,673673+ struct snd_pcm_runtime *runtime,674674+ struct vx_pipe *pipe, int size)679675{680676 int space, err = 0;681677···713705 * so that the caller can check the total transferred size later714706 * (to call snd_pcm_period_elapsed).715707 */716716-static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe)708708+static int vx_update_pipe_position(struct vx_core *chip,709709+ struct snd_pcm_runtime *runtime,710710+ struct vx_pipe *pipe)717711{718712 struct vx_rmh rmh;719713 int err, update;···741731 * transfer the pending playback buffer data to DSP742732 * called from interrupt handler743733 */744744-static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks)734734+static void vx_pcm_playback_transfer(struct vx_core *chip,735735+ struct snd_pcm_substream *subs,736736+ struct vx_pipe *pipe, int nchunks)745737{746738 int i, err;747747- snd_pcm_runtime_t *runtime = subs->runtime;739739+ struct snd_pcm_runtime *runtime = subs->runtime;748740749741 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))750742 return;···761749 * update the playback position and call snd_pcm_period_elapsed() if necessary762750 * called from interrupt handler763751 */764764-static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe)752752+static void vx_pcm_playback_update(struct vx_core *chip,753753+ struct snd_pcm_substream *subs,754754+ struct vx_pipe *pipe)765755{766756 int err;767767- snd_pcm_runtime_t *runtime = subs->runtime;757757+ struct snd_pcm_runtime *runtime = subs->runtime;768758769759 if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) {770760 if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0)···785771 */786772static void vx_pcm_delayed_start(unsigned long arg)787773{788788- snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg;789789- vx_core_t *chip = subs->pcm->private_data;790790- vx_pipe_t *pipe = subs->runtime->private_data;774774+ struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg;775775+ struct vx_core *chip = subs->pcm->private_data;776776+ struct vx_pipe *pipe = subs->runtime->private_data;791777 int err;792778793779 /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/···806792/*807793 * vx_pcm_playback_trigger - trigger callback for playback808794 */809809-static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd)795795+static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd)810796{811811- vx_core_t *chip = snd_pcm_substream_chip(subs);812812- vx_pipe_t *pipe = subs->runtime->private_data;797797+ struct vx_core *chip = snd_pcm_substream_chip(subs);798798+ struct vx_pipe *pipe = subs->runtime->private_data;813799 int err;814800815801 if (chip->chip_status & VX_STAT_IS_STALE)···853839/*854840 * vx_pcm_playback_pointer - pointer callback for playback855841 */856856-static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs)842842+static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs)857843{858858- snd_pcm_runtime_t *runtime = subs->runtime;859859- vx_pipe_t *pipe = runtime->private_data;844844+ struct snd_pcm_runtime *runtime = subs->runtime;845845+ struct vx_pipe *pipe = runtime->private_data;860846 return pipe->position;861847}862848863849/*864850 * vx_pcm_hw_params - hw_params callback for playback and capture865851 */866866-static int vx_pcm_hw_params(snd_pcm_substream_t *subs,867867- snd_pcm_hw_params_t *hw_params)852852+static int vx_pcm_hw_params(struct snd_pcm_substream *subs,853853+ struct snd_pcm_hw_params *hw_params)868854{869855 return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params));870856}···872858/*873859 * vx_pcm_hw_free - hw_free callback for playback and capture874860 */875875-static int vx_pcm_hw_free(snd_pcm_substream_t *subs)861861+static int vx_pcm_hw_free(struct snd_pcm_substream *subs)876862{877863 return snd_pcm_free_vmalloc_buffer(subs);878864}···880866/*881867 * vx_pcm_prepare - prepare callback for playback and capture882868 */883883-static int vx_pcm_prepare(snd_pcm_substream_t *subs)869869+static int vx_pcm_prepare(struct snd_pcm_substream *subs)884870{885885- vx_core_t *chip = snd_pcm_substream_chip(subs);886886- snd_pcm_runtime_t *runtime = subs->runtime;887887- vx_pipe_t *pipe = runtime->private_data;871871+ struct vx_core *chip = snd_pcm_substream_chip(subs);872872+ struct snd_pcm_runtime *runtime = subs->runtime;873873+ struct vx_pipe *pipe = runtime->private_data;888874 int err, data_mode;889875 // int max_size, nchunks;890876···911897 }912898913899 if (chip->pcm_running && chip->freq != runtime->rate) {914914- snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq);900900+ snd_printk(KERN_ERR "vx: cannot set different clock %d "901901+ "from the current %d\n", runtime->rate, chip->freq);915902 return -EINVAL;916903 }917904 vx_set_clock(chip, runtime->rate);···945930/*946931 * operators for PCM playback947932 */948948-static snd_pcm_ops_t vx_pcm_playback_ops = {933933+static struct snd_pcm_ops vx_pcm_playback_ops = {949934 .open = vx_pcm_playback_open,950935 .close = vx_pcm_playback_close,951936 .ioctl = snd_pcm_lib_ioctl,···962947 * playback hw information963948 */964949965965-static snd_pcm_hardware_t vx_pcm_capture_hw = {950950+static struct snd_pcm_hardware vx_pcm_capture_hw = {966951 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |967952 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/968953 /*SNDRV_PCM_INFO_RESUME*/),969969- .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,954954+ .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/955955+ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),970956 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,971957 .rate_min = 5000,972958 .rate_max = 48000,···985969/*986970 * vx_pcm_capture_open - open callback for capture987971 */988988-static int vx_pcm_capture_open(snd_pcm_substream_t *subs)972972+static int vx_pcm_capture_open(struct snd_pcm_substream *subs)989973{990990- snd_pcm_runtime_t *runtime = subs->runtime;991991- vx_core_t *chip = snd_pcm_substream_chip(subs);992992- vx_pipe_t *pipe;993993- vx_pipe_t *pipe_out_monitoring = NULL;974974+ struct snd_pcm_runtime *runtime = subs->runtime;975975+ struct vx_core *chip = snd_pcm_substream_chip(subs);976976+ struct vx_pipe *pipe;977977+ struct vx_pipe *pipe_out_monitoring = NULL;994978 unsigned int audio;995979 int err;996980···10211005 if an output pipe is available, it's audios still may need to be 10221006 unmuted. hence we'll have to call a mixer entry point.10231007 */10241024- vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]);10081008+ vx_set_monitor_level(chip, audio, chip->audio_monitor[audio],10091009+ chip->audio_monitor_active[audio]);10251010 /* assuming stereo */10261026- vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); 10111011+ vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1],10121012+ chip->audio_monitor_active[audio+1]); 10271013 }1028101410291015 pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */···10441026/*10451027 * vx_pcm_capture_close - close callback for capture10461028 */10471047-static int vx_pcm_capture_close(snd_pcm_substream_t *subs)10291029+static int vx_pcm_capture_close(struct snd_pcm_substream *subs)10481030{10491049- vx_core_t *chip = snd_pcm_substream_chip(subs);10501050- vx_pipe_t *pipe;10511051- vx_pipe_t *pipe_out_monitoring;10311031+ struct vx_core *chip = snd_pcm_substream_chip(subs);10321032+ struct vx_pipe *pipe;10331033+ struct vx_pipe *pipe_out_monitoring;1052103410531035 if (! subs->runtime->private_data)10541036 return -EINVAL;···10801062/*10811063 * vx_pcm_capture_update - update the capture buffer10821064 */10831083-static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe)10651065+static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs,10661066+ struct vx_pipe *pipe)10841067{10851068 int size, space, count;10861086- snd_pcm_runtime_t *runtime = subs->runtime;10691069+ struct snd_pcm_runtime *runtime = subs->runtime;1087107010881071 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))10891072 return;···11541135/*11551136 * vx_pcm_capture_pointer - pointer callback for capture11561137 */11571157-static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs)11381138+static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs)11581139{11591159- snd_pcm_runtime_t *runtime = subs->runtime;11601160- vx_pipe_t *pipe = runtime->private_data;11401140+ struct snd_pcm_runtime *runtime = subs->runtime;11411141+ struct vx_pipe *pipe = runtime->private_data;11611142 return bytes_to_frames(runtime, pipe->hw_ptr);11621143}1163114411641145/*11651146 * operators for PCM capture11661147 */11671167-static snd_pcm_ops_t vx_pcm_capture_ops = {11481148+static struct snd_pcm_ops vx_pcm_capture_ops = {11681149 .open = vx_pcm_capture_open,11691150 .close = vx_pcm_capture_close,11701151 .ioctl = snd_pcm_lib_ioctl,···11801161/*11811162 * interrupt handler for pcm streams11821163 */11831183-void vx_pcm_update_intr(vx_core_t *chip, unsigned int events)11641164+void vx_pcm_update_intr(struct vx_core *chip, unsigned int events)11841165{11851166 unsigned int i;11861186- vx_pipe_t *pipe;11671167+ struct vx_pipe *pipe;1187116811881169#define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING)11891170···12371218/*12381219 * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays12391220 */12401240-static int vx_init_audio_io(vx_core_t *chip)12211221+static int vx_init_audio_io(struct vx_core *chip)12411222{12421223 struct vx_rmh rmh;12431224 int preferred;···12531234 chip->audio_info = rmh.Stat[1];1254123512551236 /* allocate pipes */12561256- chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL);12571257- chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL);12371237+ chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL);12381238+ chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL);12581239 if (! chip->playback_pipes || ! chip->capture_pipes)12591240 return -ENOMEM;1260124112611261- memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs);12621262- memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins);12421242+ memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs);12431243+ memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins);1263124412641245 preferred = chip->ibl.size;12651246 chip->ibl.size = 0;12661247 vx_set_ibl(chip, &chip->ibl); /* query the info */12671248 if (preferred > 0) {12681268- chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity;12491249+ chip->ibl.size = ((preferred + chip->ibl.granularity - 1) /12501250+ chip->ibl.granularity) * chip->ibl.granularity;12691251 if (chip->ibl.size > chip->ibl.max_size)12701252 chip->ibl.size = chip->ibl.max_size;12711253 } else···12801260/*12811261 * free callback for pcm12821262 */12831283-static void snd_vx_pcm_free(snd_pcm_t *pcm)12631263+static void snd_vx_pcm_free(struct snd_pcm *pcm)12841264{12851285- vx_core_t *chip = pcm->private_data;12651265+ struct vx_core *chip = pcm->private_data;12861266 chip->pcm[pcm->device] = NULL;12871267 kfree(chip->playback_pipes);12881268 chip->playback_pipes = NULL;···12931273/*12941274 * snd_vx_pcm_new - create and initialize a pcm12951275 */12961296-int snd_vx_pcm_new(vx_core_t *chip)12761276+int snd_vx_pcm_new(struct vx_core *chip)12971277{12981298- snd_pcm_t *pcm;12781278+ struct snd_pcm *pcm;12991279 unsigned int i;13001280 int err;13011281
+11-11
sound/drivers/vx/vx_uer.c
···3131 * vx_modify_board_clock - tell the board that its clock has been modified3232 * @sync: DSP needs to resynchronize its FIFO3333 */3434-static int vx_modify_board_clock(vx_core_t *chip, int sync)3434+static int vx_modify_board_clock(struct vx_core *chip, int sync)3535{3636 struct vx_rmh rmh;3737···4545/*4646 * vx_modify_board_inputs - resync audio inputs4747 */4848-static int vx_modify_board_inputs(vx_core_t *chip)4848+static int vx_modify_board_inputs(struct vx_core *chip)4949{5050 struct vx_rmh rmh;5151···5959 * @index: the bit index6060 * returns 0 or 1.6161 */6262-static int vx_read_one_cbit(vx_core_t *chip, int index)6262+static int vx_read_one_cbit(struct vx_core *chip, int index)6363{6464 unsigned long flags;6565 int val;···8282 * @index: the bit index8383 * @val: bit value, 0 or 18484 */8585-static void vx_write_one_cbit(vx_core_t *chip, int index, int val)8585+static void vx_write_one_cbit(struct vx_core *chip, int index, int val)8686{8787 unsigned long flags;8888 val = !!val; /* 0 or 1 */···104104 * returns the frequency of UER, or 0 if not sync,105105 * or a negative error code.106106 */107107-static int vx_read_uer_status(vx_core_t *chip, int *mode)107107+static int vx_read_uer_status(struct vx_core *chip, int *mode)108108{109109 int val, freq;110110···160160 * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF161161 */162162163163-static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)163163+static int vx_calc_clock_from_freq(struct vx_core *chip, int freq)164164{165165 int hexfreq;166166···187187 * vx_change_clock_source - change the clock source188188 * @source: the new source189189 */190190-static void vx_change_clock_source(vx_core_t *chip, int source)190190+static void vx_change_clock_source(struct vx_core *chip, int source)191191{192192 unsigned long flags;193193···205205/*206206 * set the internal clock207207 */208208-void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)208208+void vx_set_internal_clock(struct vx_core *chip, unsigned int freq)209209{210210 int clock;211211 unsigned long flags;···228228 * set the iec958 status bits229229 * @bits: 32-bit status bits230230 */231231-void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)231231+void vx_set_iec958_status(struct vx_core *chip, unsigned int bits)232232{233233 int i;234234···243243/*244244 * vx_set_clock - change the clock and audio source if necessary245245 */246246-int vx_set_clock(vx_core_t *chip, unsigned int freq)246246+int vx_set_clock(struct vx_core *chip, unsigned int freq)247247{248248 int src_changed = 0;249249···285285/*286286 * vx_change_frequency - called from interrupt handler287287 */288288-int vx_change_frequency(vx_core_t *chip)288288+int vx_change_frequency(struct vx_core *chip)289289{290290 int freq;291291