~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/pci/echoaudio/mona.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  *  ALSA driver for Echoaudio soundcards.
  4  *  Copyright (C) 2003-2004 Giuliano Pochini <pochini@shiny.it>
  5  */
  6 
  7 #define ECHO24_FAMILY
  8 #define ECHOCARD_MONA
  9 #define ECHOCARD_NAME "Mona"
 10 #define ECHOCARD_HAS_MONITOR
 11 #define ECHOCARD_HAS_ASIC
 12 #define ECHOCARD_HAS_SUPER_INTERLEAVE
 13 #define ECHOCARD_HAS_DIGITAL_IO
 14 #define ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE
 15 #define ECHOCARD_HAS_DIGITAL_MODE_SWITCH
 16 #define ECHOCARD_HAS_EXTERNAL_CLOCK
 17 #define ECHOCARD_HAS_ADAT       6
 18 #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32
 19 
 20 /* Pipe indexes */
 21 #define PX_ANALOG_OUT   0       /* 6 */
 22 #define PX_DIGITAL_OUT  6       /* 8 */
 23 #define PX_ANALOG_IN    14      /* 4 */
 24 #define PX_DIGITAL_IN   18      /* 8 */
 25 #define PX_NUM          26
 26 
 27 /* Bus indexes */
 28 #define BX_ANALOG_OUT   0       /* 6 */
 29 #define BX_DIGITAL_OUT  6       /* 8 */
 30 #define BX_ANALOG_IN    14      /* 4 */
 31 #define BX_DIGITAL_IN   18      /* 8 */
 32 #define BX_NUM          26
 33 
 34 
 35 #include <linux/delay.h>
 36 #include <linux/init.h>
 37 #include <linux/interrupt.h>
 38 #include <linux/pci.h>
 39 #include <linux/module.h>
 40 #include <linux/firmware.h>
 41 #include <linux/slab.h>
 42 #include <linux/io.h>
 43 #include <sound/core.h>
 44 #include <sound/info.h>
 45 #include <sound/control.h>
 46 #include <sound/tlv.h>
 47 #include <sound/pcm.h>
 48 #include <sound/pcm_params.h>
 49 #include <sound/asoundef.h>
 50 #include <sound/initval.h>
 51 #include <linux/atomic.h>
 52 #include "echoaudio.h"
 53 
 54 MODULE_FIRMWARE("ea/loader_dsp.fw");
 55 MODULE_FIRMWARE("ea/mona_301_dsp.fw");
 56 MODULE_FIRMWARE("ea/mona_361_dsp.fw");
 57 MODULE_FIRMWARE("ea/mona_301_1_asic_48.fw");
 58 MODULE_FIRMWARE("ea/mona_301_1_asic_96.fw");
 59 MODULE_FIRMWARE("ea/mona_361_1_asic_48.fw");
 60 MODULE_FIRMWARE("ea/mona_361_1_asic_96.fw");
 61 MODULE_FIRMWARE("ea/mona_2_asic.fw");
 62 
 63 #define FW_361_LOADER           0
 64 #define FW_MONA_301_DSP         1
 65 #define FW_MONA_361_DSP         2
 66 #define FW_MONA_301_1_ASIC48    3
 67 #define FW_MONA_301_1_ASIC96    4
 68 #define FW_MONA_361_1_ASIC48    5
 69 #define FW_MONA_361_1_ASIC96    6
 70 #define FW_MONA_2_ASIC          7
 71 
 72 static const struct firmware card_fw[] = {
 73         {0, "loader_dsp.fw"},
 74         {0, "mona_301_dsp.fw"},
 75         {0, "mona_361_dsp.fw"},
 76         {0, "mona_301_1_asic_48.fw"},
 77         {0, "mona_301_1_asic_96.fw"},
 78         {0, "mona_361_1_asic_48.fw"},
 79         {0, "mona_361_1_asic_96.fw"},
 80         {0, "mona_2_asic.fw"}
 81 };
 82 
 83 static const struct pci_device_id snd_echo_ids[] = {
 84         {0x1057, 0x1801, 0xECC0, 0x0070, 0, 0, 0},      /* DSP 56301 Mona rev.0 */
 85         {0x1057, 0x1801, 0xECC0, 0x0071, 0, 0, 0},      /* DSP 56301 Mona rev.1 */
 86         {0x1057, 0x1801, 0xECC0, 0x0072, 0, 0, 0},      /* DSP 56301 Mona rev.2 */
 87         {0x1057, 0x3410, 0xECC0, 0x0070, 0, 0, 0},      /* DSP 56361 Mona rev.0 */
 88         {0x1057, 0x3410, 0xECC0, 0x0071, 0, 0, 0},      /* DSP 56361 Mona rev.1 */
 89         {0x1057, 0x3410, 0xECC0, 0x0072, 0, 0, 0},      /* DSP 56361 Mona rev.2 */
 90         {0,}
 91 };
 92 
 93 static const struct snd_pcm_hardware pcm_hardware_skel = {
 94         .info = SNDRV_PCM_INFO_MMAP |
 95                 SNDRV_PCM_INFO_INTERLEAVED |
 96                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
 97                 SNDRV_PCM_INFO_MMAP_VALID |
 98                 SNDRV_PCM_INFO_PAUSE |
 99                 SNDRV_PCM_INFO_SYNC_START,
100         .formats =      SNDRV_PCM_FMTBIT_U8 |
101                         SNDRV_PCM_FMTBIT_S16_LE |
102                         SNDRV_PCM_FMTBIT_S24_3LE |
103                         SNDRV_PCM_FMTBIT_S32_LE |
104                         SNDRV_PCM_FMTBIT_S32_BE,
105         .rates =        SNDRV_PCM_RATE_8000_48000 |
106                         SNDRV_PCM_RATE_88200 |
107                         SNDRV_PCM_RATE_96000,
108         .rate_min = 8000,
109         .rate_max = 96000,
110         .channels_min = 1,
111         .channels_max = 8,
112         .buffer_bytes_max = 262144,
113         .period_bytes_min = 32,
114         .period_bytes_max = 131072,
115         .periods_min = 2,
116         .periods_max = 220,
117         /* One page (4k) contains 512 instructions. I don't know if the hw
118         supports lists longer than this. In this case periods_max=220 is a
119         safe limit to make sure the list never exceeds 512 instructions. */
120 };
121 
122 
123 #include "mona_dsp.c"
124 #include "echoaudio_dsp.c"
125 #include "echoaudio_gml.c"
126 #include "echoaudio.c"
127 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php