1873e65bcSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 2a2328d02SGiuliano Pochini /* 3a2328d02SGiuliano Pochini * ALSA driver for Echoaudio soundcards. 4a2328d02SGiuliano Pochini * Copyright (C) 2009 Giuliano Pochini <pochini@shiny.it> 5a2328d02SGiuliano Pochini */ 6a2328d02SGiuliano Pochini 7a2328d02SGiuliano Pochini #define INDIGO_FAMILY 8a2328d02SGiuliano Pochini #define ECHOCARD_INDIGO_IOX 9a2328d02SGiuliano Pochini #define ECHOCARD_NAME "Indigo IOx" 10a2328d02SGiuliano Pochini #define ECHOCARD_HAS_MONITOR 11a2328d02SGiuliano Pochini #define ECHOCARD_HAS_SUPER_INTERLEAVE 12a2328d02SGiuliano Pochini #define ECHOCARD_HAS_VMIXER 13a2328d02SGiuliano Pochini #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 14a2328d02SGiuliano Pochini 15a2328d02SGiuliano Pochini /* Pipe indexes */ 16a2328d02SGiuliano Pochini #define PX_ANALOG_OUT 0 /* 8 */ 17a2328d02SGiuliano Pochini #define PX_DIGITAL_OUT 8 /* 0 */ 18a2328d02SGiuliano Pochini #define PX_ANALOG_IN 8 /* 2 */ 19a2328d02SGiuliano Pochini #define PX_DIGITAL_IN 10 /* 0 */ 20a2328d02SGiuliano Pochini #define PX_NUM 10 21a2328d02SGiuliano Pochini 22a2328d02SGiuliano Pochini /* Bus indexes */ 23a2328d02SGiuliano Pochini #define BX_ANALOG_OUT 0 /* 2 */ 24a2328d02SGiuliano Pochini #define BX_DIGITAL_OUT 2 /* 0 */ 25a2328d02SGiuliano Pochini #define BX_ANALOG_IN 2 /* 2 */ 26a2328d02SGiuliano Pochini #define BX_DIGITAL_IN 4 /* 0 */ 27a2328d02SGiuliano Pochini #define BX_NUM 4 28a2328d02SGiuliano Pochini 29a2328d02SGiuliano Pochini 30a2328d02SGiuliano Pochini #include <linux/delay.h> 31a2328d02SGiuliano Pochini #include <linux/init.h> 32a2328d02SGiuliano Pochini #include <linux/interrupt.h> 33a2328d02SGiuliano Pochini #include <linux/pci.h> 3465a77217SPaul Gortmaker #include <linux/module.h> 35a2328d02SGiuliano Pochini #include <linux/firmware.h> 36a2328d02SGiuliano Pochini #include <linux/io.h> 375a0e3ad6STejun Heo #include <linux/slab.h> 38a2328d02SGiuliano Pochini #include <sound/core.h> 39a2328d02SGiuliano Pochini #include <sound/info.h> 40a2328d02SGiuliano Pochini #include <sound/control.h> 41a2328d02SGiuliano Pochini #include <sound/tlv.h> 42a2328d02SGiuliano Pochini #include <sound/pcm.h> 43a2328d02SGiuliano Pochini #include <sound/pcm_params.h> 44a2328d02SGiuliano Pochini #include <sound/asoundef.h> 45a2328d02SGiuliano Pochini #include <sound/initval.h> 4660063497SArun Sharma #include <linux/atomic.h> 47a2328d02SGiuliano Pochini #include "echoaudio.h" 48a2328d02SGiuliano Pochini 49a2328d02SGiuliano Pochini MODULE_FIRMWARE("ea/loader_dsp.fw"); 50a2328d02SGiuliano Pochini MODULE_FIRMWARE("ea/indigo_iox_dsp.fw"); 51a2328d02SGiuliano Pochini 52a2328d02SGiuliano Pochini #define FW_361_LOADER 0 53a2328d02SGiuliano Pochini #define FW_INDIGO_IOX_DSP 1 54a2328d02SGiuliano Pochini 55a2328d02SGiuliano Pochini static const struct firmware card_fw[] = { 56a2328d02SGiuliano Pochini {0, "loader_dsp.fw"}, 57a2328d02SGiuliano Pochini {0, "indigo_iox_dsp.fw"} 58a2328d02SGiuliano Pochini }; 59a2328d02SGiuliano Pochini 609baa3c34SBenoit Taine static const struct pci_device_id snd_echo_ids[] = { 61a2328d02SGiuliano Pochini {0x1057, 0x3410, 0xECC0, 0x00D0, 0, 0, 0}, /* Indigo IOx */ 62a2328d02SGiuliano Pochini {0,} 63a2328d02SGiuliano Pochini }; 64a2328d02SGiuliano Pochini 65*c1c3981fSTakashi Iwai static const struct snd_pcm_hardware pcm_hardware_skel = { 66a2328d02SGiuliano Pochini .info = SNDRV_PCM_INFO_MMAP | 67a2328d02SGiuliano Pochini SNDRV_PCM_INFO_INTERLEAVED | 68a2328d02SGiuliano Pochini SNDRV_PCM_INFO_BLOCK_TRANSFER | 69a2328d02SGiuliano Pochini SNDRV_PCM_INFO_MMAP_VALID | 70a2328d02SGiuliano Pochini SNDRV_PCM_INFO_PAUSE | 71a2328d02SGiuliano Pochini SNDRV_PCM_INFO_SYNC_START, 72a2328d02SGiuliano Pochini .formats = SNDRV_PCM_FMTBIT_U8 | 73a2328d02SGiuliano Pochini SNDRV_PCM_FMTBIT_S16_LE | 74a2328d02SGiuliano Pochini SNDRV_PCM_FMTBIT_S24_3LE | 75a2328d02SGiuliano Pochini SNDRV_PCM_FMTBIT_S32_LE | 76a2328d02SGiuliano Pochini SNDRV_PCM_FMTBIT_S32_BE, 77a2328d02SGiuliano Pochini .rates = SNDRV_PCM_RATE_32000 | 78a2328d02SGiuliano Pochini SNDRV_PCM_RATE_44100 | 79a2328d02SGiuliano Pochini SNDRV_PCM_RATE_48000 | 803f68165eSGiuliano Pochini SNDRV_PCM_RATE_64000 | 81a2328d02SGiuliano Pochini SNDRV_PCM_RATE_88200 | 82a2328d02SGiuliano Pochini SNDRV_PCM_RATE_96000, 83a2328d02SGiuliano Pochini .rate_min = 32000, 84a2328d02SGiuliano Pochini .rate_max = 96000, 85a2328d02SGiuliano Pochini .channels_min = 1, 86a2328d02SGiuliano Pochini .channels_max = 8, 87a2328d02SGiuliano Pochini .buffer_bytes_max = 262144, 88a2328d02SGiuliano Pochini .period_bytes_min = 32, 89a2328d02SGiuliano Pochini .period_bytes_max = 131072, 90a2328d02SGiuliano Pochini .periods_min = 2, 91a2328d02SGiuliano Pochini .periods_max = 220, 92a2328d02SGiuliano Pochini }; 93a2328d02SGiuliano Pochini 94a2328d02SGiuliano Pochini #include "indigoiox_dsp.c" 95a2328d02SGiuliano Pochini #include "indigo_express_dsp.c" 96a2328d02SGiuliano Pochini #include "echoaudio_dsp.c" 97a2328d02SGiuliano Pochini #include "echoaudio.c" 98a2328d02SGiuliano Pochini 99