Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'topic/echoaudio' into for-linus

+508 -64
+20
sound/pci/Kconfig
··· 400 400 To compile this driver as a module, choose M here: the module 401 401 will be called snd-indigodj 402 402 403 + config SND_INDIGOIOX 404 + tristate "(Echoaudio) Indigo IOx" 405 + select FW_LOADER 406 + select SND_PCM 407 + help 408 + Say 'Y' or 'M' to include support for Echoaudio Indigo IOx. 409 + 410 + To compile this driver as a module, choose M here: the module 411 + will be called snd-indigoiox 412 + 413 + config SND_INDIGODJX 414 + tristate "(Echoaudio) Indigo DJx" 415 + select FW_LOADER 416 + select SND_PCM 417 + help 418 + Say 'Y' or 'M' to include support for Echoaudio Indigo DJx. 419 + 420 + To compile this driver as a module, choose M here: the module 421 + will be called snd-indigodjx 422 + 403 423 config SND_EMU10K1 404 424 tristate "Emu10k1 (SB Live!, Audigy, E-mu APS)" 405 425 select FW_LOADER
+4
sound/pci/echoaudio/Makefile
··· 15 15 snd-indigo-objs := indigo.o 16 16 snd-indigoio-objs := indigoio.o 17 17 snd-indigodj-objs := indigodj.o 18 + snd-indigoiox-objs := indigoiox.o 19 + snd-indigodjx-objs := indigodjx.o 18 20 19 21 obj-$(CONFIG_SND_DARLA20) += snd-darla20.o 20 22 obj-$(CONFIG_SND_GINA20) += snd-gina20.o ··· 30 28 obj-$(CONFIG_SND_INDIGO) += snd-indigo.o 31 29 obj-$(CONFIG_SND_INDIGOIO) += snd-indigoio.o 32 30 obj-$(CONFIG_SND_INDIGODJ) += snd-indigodj.o 31 + obj-$(CONFIG_SND_INDIGOIOX) += snd-indigoiox.o 32 + obj-$(CONFIG_SND_INDIGODJX) += snd-indigodjx.o
+3 -14
sound/pci/echoaudio/echoaudio.c
··· 950 950 Control interface 951 951 ******************************************************************************/ 952 952 953 + #ifndef ECHOCARD_HAS_VMIXER 954 + 953 955 /******************* PCM output volume *******************/ 954 956 static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, 955 957 struct snd_ctl_elem_info *uinfo) ··· 1003 1001 return changed; 1004 1002 } 1005 1003 1006 - #ifdef ECHOCARD_HAS_VMIXER 1007 - /* On Vmixer cards this one controls the line-out volume */ 1008 - static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = { 1009 - .name = "Line Playback Volume", 1010 - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1011 - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, 1012 - .info = snd_echo_output_gain_info, 1013 - .get = snd_echo_output_gain_get, 1014 - .put = snd_echo_output_gain_put, 1015 - .tlv = {.p = db_scale_output_gain}, 1016 - }; 1017 - #else 1018 1004 static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { 1019 1005 .name = "PCM Playback Volume", 1020 1006 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ··· 1012 1022 .put = snd_echo_output_gain_put, 1013 1023 .tlv = {.p = db_scale_output_gain}, 1014 1024 }; 1025 + 1015 1026 #endif 1016 1027 1017 1028 ··· 2028 2037 2029 2038 #ifdef ECHOCARD_HAS_VMIXER 2030 2039 snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip); 2031 - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_output_gain, chip))) < 0) 2032 - goto ctl_error; 2033 2040 if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0) 2034 2041 goto ctl_error; 2035 2042 #else
+3
sound/pci/echoaudio/echoaudio.h
··· 189 189 #define INDIGO 0x0090 190 190 #define INDIGO_IO 0x00a0 191 191 #define INDIGO_DJ 0x00b0 192 + #define DC8 0x00c0 193 + #define INDIGO_IOX 0x00d0 194 + #define INDIGO_DJX 0x00e0 192 195 #define ECHO3G 0x0100 193 196 194 197
+7 -2
sound/pci/echoaudio/echoaudio_dsp.h
··· 576 576 #define E3G_ASIC_NOT_LOADED 0xffff 577 577 #define E3G_BOX_TYPE_MASK 0xf0 578 578 579 - #define EXT_3GBOX_NC 0x01 580 - #define EXT_3GBOX_NOT_SET 0x02 579 + /* Indigo express control register values */ 580 + #define INDIGO_EXPRESS_32000 0x02 581 + #define INDIGO_EXPRESS_44100 0x01 582 + #define INDIGO_EXPRESS_48000 0x00 583 + #define INDIGO_EXPRESS_DOUBLE_SPEED 0x10 584 + #define INDIGO_EXPRESS_QUAD_SPEED 0x04 585 + #define INDIGO_EXPRESS_CLOCK_MASK 0x17 581 586 582 587 583 588 /*
-12
sound/pci/echoaudio/indigo_dsp.c
··· 63 63 if ((err = init_line_levels(chip)) < 0) 64 64 return err; 65 65 66 - /* Default routing of the virtual channels: all vchannels are routed 67 - to the stereo output */ 68 - set_vmixer_gain(chip, 0, 0, 0); 69 - set_vmixer_gain(chip, 1, 1, 0); 70 - set_vmixer_gain(chip, 0, 2, 0); 71 - set_vmixer_gain(chip, 1, 3, 0); 72 - set_vmixer_gain(chip, 0, 4, 0); 73 - set_vmixer_gain(chip, 1, 5, 0); 74 - set_vmixer_gain(chip, 0, 6, 0); 75 - set_vmixer_gain(chip, 1, 7, 0); 76 - err = update_vmixer_level(chip); 77 - 78 66 DE_INIT(("init_hw done\n")); 79 67 return err; 80 68 }
+119
sound/pci/echoaudio/indigo_express_dsp.c
··· 1 + /************************************************************************ 2 + 3 + This file is part of Echo Digital Audio's generic driver library. 4 + Copyright Echo Digital Audio Corporation (c) 1998 - 2005 5 + All rights reserved 6 + www.echoaudio.com 7 + 8 + This library is free software; you can redistribute it and/or 9 + modify it under the terms of the GNU Lesser General Public 10 + License as published by the Free Software Foundation; either 11 + version 2.1 of the License, or (at your option) any later version. 12 + 13 + This library is distributed in the hope that it will be useful, 14 + but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 + Lesser General Public License for more details. 17 + 18 + You should have received a copy of the GNU Lesser General Public 19 + License along with this library; if not, write to the Free Software 20 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + 22 + ************************************************************************* 23 + 24 + Translation from C++ and adaptation for use in ALSA-Driver 25 + were made by Giuliano Pochini <pochini@shiny.it> 26 + 27 + *************************************************************************/ 28 + 29 + static int set_sample_rate(struct echoaudio *chip, u32 rate) 30 + { 31 + u32 clock, control_reg, old_control_reg; 32 + 33 + if (wait_handshake(chip)) 34 + return -EIO; 35 + 36 + old_control_reg = le32_to_cpu(chip->comm_page->control_register); 37 + control_reg = old_control_reg & ~INDIGO_EXPRESS_CLOCK_MASK; 38 + 39 + switch (rate) { 40 + case 32000: 41 + clock = INDIGO_EXPRESS_32000; 42 + break; 43 + case 44100: 44 + clock = INDIGO_EXPRESS_44100; 45 + break; 46 + case 48000: 47 + clock = INDIGO_EXPRESS_48000; 48 + break; 49 + case 64000: 50 + clock = INDIGO_EXPRESS_32000|INDIGO_EXPRESS_DOUBLE_SPEED; 51 + break; 52 + case 88200: 53 + clock = INDIGO_EXPRESS_44100|INDIGO_EXPRESS_DOUBLE_SPEED; 54 + break; 55 + case 96000: 56 + clock = INDIGO_EXPRESS_48000|INDIGO_EXPRESS_DOUBLE_SPEED; 57 + break; 58 + default: 59 + return -EINVAL; 60 + } 61 + 62 + control_reg |= clock; 63 + if (control_reg != old_control_reg) { 64 + chip->comm_page->control_register = cpu_to_le32(control_reg); 65 + chip->sample_rate = rate; 66 + clear_handshake(chip); 67 + return send_vector(chip, DSP_VC_UPDATE_CLOCKS); 68 + } 69 + return 0; 70 + } 71 + 72 + 73 + 74 + /* This function routes the sound from a virtual channel to a real output */ 75 + static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, 76 + int gain) 77 + { 78 + int index; 79 + 80 + if (snd_BUG_ON(pipe >= num_pipes_out(chip) || 81 + output >= num_busses_out(chip))) 82 + return -EINVAL; 83 + 84 + if (wait_handshake(chip)) 85 + return -EIO; 86 + 87 + chip->vmixer_gain[output][pipe] = gain; 88 + index = output * num_pipes_out(chip) + pipe; 89 + chip->comm_page->vmixer[index] = gain; 90 + 91 + DE_ACT(("set_vmixer_gain: pipe %d, out %d = %d\n", pipe, output, gain)); 92 + return 0; 93 + } 94 + 95 + 96 + 97 + /* Tell the DSP to read and update virtual mixer levels in comm page. */ 98 + static int update_vmixer_level(struct echoaudio *chip) 99 + { 100 + if (wait_handshake(chip)) 101 + return -EIO; 102 + clear_handshake(chip); 103 + return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); 104 + } 105 + 106 + 107 + 108 + static u32 detect_input_clocks(const struct echoaudio *chip) 109 + { 110 + return ECHO_CLOCK_BIT_INTERNAL; 111 + } 112 + 113 + 114 + 115 + /* The IndigoIO has no ASIC. Just do nothing */ 116 + static int load_asic(struct echoaudio *chip) 117 + { 118 + return 0; 119 + }
-12
sound/pci/echoaudio/indigodj_dsp.c
··· 63 63 if ((err = init_line_levels(chip)) < 0) 64 64 return err; 65 65 66 - /* Default routing of the virtual channels: vchannels 0-3 and 67 - vchannels 4-7 are routed to real channels 0-4 */ 68 - set_vmixer_gain(chip, 0, 0, 0); 69 - set_vmixer_gain(chip, 1, 1, 0); 70 - set_vmixer_gain(chip, 2, 2, 0); 71 - set_vmixer_gain(chip, 3, 3, 0); 72 - set_vmixer_gain(chip, 0, 4, 0); 73 - set_vmixer_gain(chip, 1, 5, 0); 74 - set_vmixer_gain(chip, 2, 6, 0); 75 - set_vmixer_gain(chip, 3, 7, 0); 76 - err = update_vmixer_level(chip); 77 - 78 66 DE_INIT(("init_hw done\n")); 79 67 return err; 80 68 }
+107
sound/pci/echoaudio/indigodjx.c
··· 1 + /* 2 + * ALSA driver for Echoaudio soundcards. 3 + * Copyright (C) 2009 Giuliano Pochini <pochini@shiny.it> 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; version 2 of the License. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 + */ 18 + 19 + #define INDIGO_FAMILY 20 + #define ECHOCARD_INDIGO_DJX 21 + #define ECHOCARD_NAME "Indigo DJx" 22 + #define ECHOCARD_HAS_SUPER_INTERLEAVE 23 + #define ECHOCARD_HAS_VMIXER 24 + #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 25 + 26 + /* Pipe indexes */ 27 + #define PX_ANALOG_OUT 0 /* 8 */ 28 + #define PX_DIGITAL_OUT 8 /* 0 */ 29 + #define PX_ANALOG_IN 8 /* 0 */ 30 + #define PX_DIGITAL_IN 8 /* 0 */ 31 + #define PX_NUM 8 32 + 33 + /* Bus indexes */ 34 + #define BX_ANALOG_OUT 0 /* 4 */ 35 + #define BX_DIGITAL_OUT 4 /* 0 */ 36 + #define BX_ANALOG_IN 4 /* 0 */ 37 + #define BX_DIGITAL_IN 4 /* 0 */ 38 + #define BX_NUM 4 39 + 40 + 41 + #include <linux/delay.h> 42 + #include <linux/init.h> 43 + #include <linux/interrupt.h> 44 + #include <linux/pci.h> 45 + #include <linux/slab.h> 46 + #include <linux/moduleparam.h> 47 + #include <linux/firmware.h> 48 + #include <linux/io.h> 49 + #include <sound/core.h> 50 + #include <sound/info.h> 51 + #include <sound/control.h> 52 + #include <sound/tlv.h> 53 + #include <sound/pcm.h> 54 + #include <sound/pcm_params.h> 55 + #include <sound/asoundef.h> 56 + #include <sound/initval.h> 57 + #include <asm/atomic.h> 58 + #include "echoaudio.h" 59 + 60 + MODULE_FIRMWARE("ea/loader_dsp.fw"); 61 + MODULE_FIRMWARE("ea/indigo_djx_dsp.fw"); 62 + 63 + #define FW_361_LOADER 0 64 + #define FW_INDIGO_DJX_DSP 1 65 + 66 + static const struct firmware card_fw[] = { 67 + {0, "loader_dsp.fw"}, 68 + {0, "indigo_djx_dsp.fw"} 69 + }; 70 + 71 + static struct pci_device_id snd_echo_ids[] = { 72 + {0x1057, 0x3410, 0xECC0, 0x00E0, 0, 0, 0}, /* Indigo DJx*/ 73 + {0,} 74 + }; 75 + 76 + static struct snd_pcm_hardware pcm_hardware_skel = { 77 + .info = SNDRV_PCM_INFO_MMAP | 78 + SNDRV_PCM_INFO_INTERLEAVED | 79 + SNDRV_PCM_INFO_BLOCK_TRANSFER | 80 + SNDRV_PCM_INFO_MMAP_VALID | 81 + SNDRV_PCM_INFO_PAUSE | 82 + SNDRV_PCM_INFO_SYNC_START, 83 + .formats = SNDRV_PCM_FMTBIT_U8 | 84 + SNDRV_PCM_FMTBIT_S16_LE | 85 + SNDRV_PCM_FMTBIT_S24_3LE | 86 + SNDRV_PCM_FMTBIT_S32_LE | 87 + SNDRV_PCM_FMTBIT_S32_BE, 88 + .rates = SNDRV_PCM_RATE_32000 | 89 + SNDRV_PCM_RATE_44100 | 90 + SNDRV_PCM_RATE_48000 | 91 + SNDRV_PCM_RATE_88200 | 92 + SNDRV_PCM_RATE_96000, 93 + .rate_min = 32000, 94 + .rate_max = 96000, 95 + .channels_min = 1, 96 + .channels_max = 4, 97 + .buffer_bytes_max = 262144, 98 + .period_bytes_min = 32, 99 + .period_bytes_max = 131072, 100 + .periods_min = 2, 101 + .periods_max = 220, 102 + }; 103 + 104 + #include "indigodjx_dsp.c" 105 + #include "indigo_express_dsp.c" 106 + #include "echoaudio_dsp.c" 107 + #include "echoaudio.c"
+68
sound/pci/echoaudio/indigodjx_dsp.c
··· 1 + /************************************************************************ 2 + 3 + This file is part of Echo Digital Audio's generic driver library. 4 + Copyright Echo Digital Audio Corporation (c) 1998 - 2005 5 + All rights reserved 6 + www.echoaudio.com 7 + 8 + This library is free software; you can redistribute it and/or 9 + modify it under the terms of the GNU Lesser General Public 10 + License as published by the Free Software Foundation; either 11 + version 2.1 of the License, or (at your option) any later version. 12 + 13 + This library is distributed in the hope that it will be useful, 14 + but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 + Lesser General Public License for more details. 17 + 18 + You should have received a copy of the GNU Lesser General Public 19 + License along with this library; if not, write to the Free Software 20 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + 22 + ************************************************************************* 23 + 24 + Translation from C++ and adaptation for use in ALSA-Driver 25 + were made by Giuliano Pochini <pochini@shiny.it> 26 + 27 + *************************************************************************/ 28 + 29 + static int update_vmixer_level(struct echoaudio *chip); 30 + static int set_vmixer_gain(struct echoaudio *chip, u16 output, 31 + u16 pipe, int gain); 32 + 33 + 34 + static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) 35 + { 36 + int err; 37 + 38 + DE_INIT(("init_hw() - Indigo DJx\n")); 39 + if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO_DJX)) 40 + return -ENODEV; 41 + 42 + err = init_dsp_comm_page(chip); 43 + if (err < 0) { 44 + DE_INIT(("init_hw - could not initialize DSP comm page\n")); 45 + return err; 46 + } 47 + 48 + chip->device_id = device_id; 49 + chip->subdevice_id = subdevice_id; 50 + chip->bad_board = TRUE; 51 + chip->dsp_code_to_load = &card_fw[FW_INDIGO_DJX_DSP]; 52 + /* Since this card has no ASIC, mark it as loaded so everything 53 + works OK */ 54 + chip->asic_loaded = TRUE; 55 + chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; 56 + 57 + err = load_firmware(chip); 58 + if (err < 0) 59 + return err; 60 + chip->bad_board = FALSE; 61 + 62 + err = init_line_levels(chip); 63 + if (err < 0) 64 + return err; 65 + 66 + DE_INIT(("init_hw done\n")); 67 + return err; 68 + }
-12
sound/pci/echoaudio/indigoio_dsp.c
··· 63 63 if ((err = init_line_levels(chip)) < 0) 64 64 return err; 65 65 66 - /* Default routing of the virtual channels: all vchannels are routed 67 - to the stereo output */ 68 - set_vmixer_gain(chip, 0, 0, 0); 69 - set_vmixer_gain(chip, 1, 1, 0); 70 - set_vmixer_gain(chip, 0, 2, 0); 71 - set_vmixer_gain(chip, 1, 3, 0); 72 - set_vmixer_gain(chip, 0, 4, 0); 73 - set_vmixer_gain(chip, 1, 5, 0); 74 - set_vmixer_gain(chip, 0, 6, 0); 75 - set_vmixer_gain(chip, 1, 7, 0); 76 - err = update_vmixer_level(chip); 77 - 78 66 DE_INIT(("init_hw done\n")); 79 67 return err; 80 68 }
+109
sound/pci/echoaudio/indigoiox.c
··· 1 + /* 2 + * ALSA driver for Echoaudio soundcards. 3 + * Copyright (C) 2009 Giuliano Pochini <pochini@shiny.it> 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; version 2 of the License. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 + */ 18 + 19 + #define INDIGO_FAMILY 20 + #define ECHOCARD_INDIGO_IOX 21 + #define ECHOCARD_NAME "Indigo IOx" 22 + #define ECHOCARD_HAS_MONITOR 23 + #define ECHOCARD_HAS_SUPER_INTERLEAVE 24 + #define ECHOCARD_HAS_VMIXER 25 + #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 26 + 27 + /* Pipe indexes */ 28 + #define PX_ANALOG_OUT 0 /* 8 */ 29 + #define PX_DIGITAL_OUT 8 /* 0 */ 30 + #define PX_ANALOG_IN 8 /* 2 */ 31 + #define PX_DIGITAL_IN 10 /* 0 */ 32 + #define PX_NUM 10 33 + 34 + /* Bus indexes */ 35 + #define BX_ANALOG_OUT 0 /* 2 */ 36 + #define BX_DIGITAL_OUT 2 /* 0 */ 37 + #define BX_ANALOG_IN 2 /* 2 */ 38 + #define BX_DIGITAL_IN 4 /* 0 */ 39 + #define BX_NUM 4 40 + 41 + 42 + #include <linux/delay.h> 43 + #include <linux/init.h> 44 + #include <linux/interrupt.h> 45 + #include <linux/pci.h> 46 + #include <linux/slab.h> 47 + #include <linux/moduleparam.h> 48 + #include <linux/firmware.h> 49 + #include <linux/io.h> 50 + #include <sound/core.h> 51 + #include <sound/info.h> 52 + #include <sound/control.h> 53 + #include <sound/tlv.h> 54 + #include <sound/pcm.h> 55 + #include <sound/pcm_params.h> 56 + #include <sound/asoundef.h> 57 + #include <sound/initval.h> 58 + #include <asm/atomic.h> 59 + #include "echoaudio.h" 60 + 61 + MODULE_FIRMWARE("ea/loader_dsp.fw"); 62 + MODULE_FIRMWARE("ea/indigo_iox_dsp.fw"); 63 + 64 + #define FW_361_LOADER 0 65 + #define FW_INDIGO_IOX_DSP 1 66 + 67 + static const struct firmware card_fw[] = { 68 + {0, "loader_dsp.fw"}, 69 + {0, "indigo_iox_dsp.fw"} 70 + }; 71 + 72 + static struct pci_device_id snd_echo_ids[] = { 73 + {0x1057, 0x3410, 0xECC0, 0x00D0, 0, 0, 0}, /* Indigo IOx */ 74 + {0,} 75 + }; 76 + 77 + static struct snd_pcm_hardware pcm_hardware_skel = { 78 + .info = SNDRV_PCM_INFO_MMAP | 79 + SNDRV_PCM_INFO_INTERLEAVED | 80 + SNDRV_PCM_INFO_BLOCK_TRANSFER | 81 + SNDRV_PCM_INFO_MMAP_VALID | 82 + SNDRV_PCM_INFO_PAUSE | 83 + SNDRV_PCM_INFO_SYNC_START, 84 + .formats = SNDRV_PCM_FMTBIT_U8 | 85 + SNDRV_PCM_FMTBIT_S16_LE | 86 + SNDRV_PCM_FMTBIT_S24_3LE | 87 + SNDRV_PCM_FMTBIT_S32_LE | 88 + SNDRV_PCM_FMTBIT_S32_BE, 89 + .rates = SNDRV_PCM_RATE_32000 | 90 + SNDRV_PCM_RATE_44100 | 91 + SNDRV_PCM_RATE_48000 | 92 + SNDRV_PCM_RATE_88200 | 93 + SNDRV_PCM_RATE_96000, 94 + .rate_min = 32000, 95 + .rate_max = 96000, 96 + .channels_min = 1, 97 + .channels_max = 8, 98 + .buffer_bytes_max = 262144, 99 + .period_bytes_min = 32, 100 + .period_bytes_max = 131072, 101 + .periods_min = 2, 102 + .periods_max = 220, 103 + }; 104 + 105 + #include "indigoiox_dsp.c" 106 + #include "indigo_express_dsp.c" 107 + #include "echoaudio_dsp.c" 108 + #include "echoaudio.c" 109 +
+68
sound/pci/echoaudio/indigoiox_dsp.c
··· 1 + /************************************************************************ 2 + 3 + This file is part of Echo Digital Audio's generic driver library. 4 + Copyright Echo Digital Audio Corporation (c) 1998 - 2005 5 + All rights reserved 6 + www.echoaudio.com 7 + 8 + This library is free software; you can redistribute it and/or 9 + modify it under the terms of the GNU Lesser General Public 10 + License as published by the Free Software Foundation; either 11 + version 2.1 of the License, or (at your option) any later version. 12 + 13 + This library is distributed in the hope that it will be useful, 14 + but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 + Lesser General Public License for more details. 17 + 18 + You should have received a copy of the GNU Lesser General Public 19 + License along with this library; if not, write to the Free Software 20 + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 + 22 + ************************************************************************* 23 + 24 + Translation from C++ and adaptation for use in ALSA-Driver 25 + were made by Giuliano Pochini <pochini@shiny.it> 26 + 27 + *************************************************************************/ 28 + 29 + static int update_vmixer_level(struct echoaudio *chip); 30 + static int set_vmixer_gain(struct echoaudio *chip, u16 output, 31 + u16 pipe, int gain); 32 + 33 + 34 + static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) 35 + { 36 + int err; 37 + 38 + DE_INIT(("init_hw() - Indigo IOx\n")); 39 + if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO_IOX)) 40 + return -ENODEV; 41 + 42 + err = init_dsp_comm_page(chip); 43 + if (err < 0) { 44 + DE_INIT(("init_hw - could not initialize DSP comm page\n")); 45 + return err; 46 + } 47 + 48 + chip->device_id = device_id; 49 + chip->subdevice_id = subdevice_id; 50 + chip->bad_board = TRUE; 51 + chip->dsp_code_to_load = &card_fw[FW_INDIGO_IOX_DSP]; 52 + /* Since this card has no ASIC, mark it as loaded so everything 53 + works OK */ 54 + chip->asic_loaded = TRUE; 55 + chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; 56 + 57 + err = load_firmware(chip); 58 + if (err < 0) 59 + return err; 60 + chip->bad_board = FALSE; 61 + 62 + err = init_line_levels(chip); 63 + if (err < 0) 64 + return err; 65 + 66 + DE_INIT(("init_hw done\n")); 67 + return err; 68 + }
-12
sound/pci/echoaudio/mia_dsp.c
··· 69 69 if ((err = init_line_levels(chip))) 70 70 return err; 71 71 72 - /* Default routing of the virtual channels: vchannels 0-3 go to analog 73 - outputs and vchannels 4-7 go to S/PDIF outputs */ 74 - set_vmixer_gain(chip, 0, 0, 0); 75 - set_vmixer_gain(chip, 1, 1, 0); 76 - set_vmixer_gain(chip, 0, 2, 0); 77 - set_vmixer_gain(chip, 1, 3, 0); 78 - set_vmixer_gain(chip, 2, 4, 0); 79 - set_vmixer_gain(chip, 3, 5, 0); 80 - set_vmixer_gain(chip, 2, 6, 0); 81 - set_vmixer_gain(chip, 3, 7, 0); 82 - err = update_vmixer_level(chip); 83 - 84 72 DE_INIT(("init_hw done\n")); 85 73 return err; 86 74 }