Path: blob/master/sound/pci/echoaudio/indigoiox_dsp.c
10818 views
/************************************************************************12This file is part of Echo Digital Audio's generic driver library.3Copyright Echo Digital Audio Corporation (c) 1998 - 20054All rights reserved5www.echoaudio.com67This library is free software; you can redistribute it and/or8modify it under the terms of the GNU Lesser General Public9License as published by the Free Software Foundation; either10version 2.1 of the License, or (at your option) any later version.1112This library is distributed in the hope that it will be useful,13but WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15Lesser General Public License for more details.1617You should have received a copy of the GNU Lesser General Public18License along with this library; if not, write to the Free Software19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA2021*************************************************************************2223Translation from C++ and adaptation for use in ALSA-Driver24were made by Giuliano Pochini <[email protected]>2526*************************************************************************/2728static int update_vmixer_level(struct echoaudio *chip);29static int set_vmixer_gain(struct echoaudio *chip, u16 output,30u16 pipe, int gain);313233static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)34{35int err;3637DE_INIT(("init_hw() - Indigo IOx\n"));38if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO_IOX))39return -ENODEV;4041err = init_dsp_comm_page(chip);42if (err < 0) {43DE_INIT(("init_hw - could not initialize DSP comm page\n"));44return err;45}4647chip->device_id = device_id;48chip->subdevice_id = subdevice_id;49chip->bad_board = TRUE;50chip->dsp_code_to_load = FW_INDIGO_IOX_DSP;51/* Since this card has no ASIC, mark it as loaded so everything52works OK */53chip->asic_loaded = TRUE;54chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL;5556err = load_firmware(chip);57if (err < 0)58return err;59chip->bad_board = FALSE;6061DE_INIT(("init_hw done\n"));62return err;63}64656667static int set_mixer_defaults(struct echoaudio *chip)68{69return init_line_levels(chip);70}717273