Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd7b254d authored by Giuliano Pochini's avatar Giuliano Pochini Committed by Jaroslav Kysela
Browse files

[ALSA] Add echoaudio sound drivers



From: Giuliano Pochini <pochini@shiny.it>Add echoaudio sound drivers (darla20, darla24, echo3g, gina20, gina24,
indigo, indigodj, indigoio, layla20, lala24, mia, mona)

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent cb9d24e4
Loading
Loading
Loading
Loading
+96 −0
Original line number Diff line number Diff line
@@ -472,6 +472,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

    The power-management is supported.

  Module snd-darla20
  ------------------

    Module for Echoaudio Darla20

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-darla24
  ------------------

    Module for Echoaudio Darla24

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-dt019x
  -----------------

@@ -499,6 +515,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

    The power-management is supported.

  Module snd-echo3g
  -----------------

    Module for Echoaudio 3G cards (Gina3G/Layla3G)

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-emu10k1
  ------------------

@@ -657,6 +681,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
    
    The power-management is supported.

  Module snd-gina20
  -----------------

    Module for Echoaudio Gina20

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-gina24
  -----------------

    Module for Echoaudio Gina24

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-gusclassic
  ---------------------

@@ -937,6 +977,30 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
	  driver isn't configured properly or you want to try another
	  type for testing.

  Module snd-indigo
  -----------------

    Module for Echoaudio Indigo

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-indigodj
  -------------------

    Module for Echoaudio Indigo DJ

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-indigoio
  -------------------

    Module for Echoaudio Indigo IO

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-intel8x0
  -------------------

@@ -1036,6 +1100,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

    This module supports multiple cards.

  Module snd-layla20
  ------------------

    Module for Echoaudio Layla20

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-layla24
  ------------------

    Module for Echoaudio Layla24

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-maestro3
  -------------------

@@ -1056,6 +1136,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

    The power-management is supported.

  Module snd-mia
  ---------------

    Module for Echoaudio Mia

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-miro
  ---------------

@@ -1088,6 +1176,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
    When no hotplug fw loader is available, you need to load the
    firmware via mixartloader utility in alsa-tools package.

  Module snd-mona
  ---------------

    Module for Echoaudio Mona

    This module supports multiple cards.
    The driver requires the firmware loader support on kernel.

  Module snd-mpu401
  -----------------

+137 −0
Original line number Diff line number Diff line
@@ -233,6 +233,143 @@ config SND_CS5535AUDIO
	  To compile this driver as a module, choose M here: the module
	  will be called snd-cs5535audio.

config SND_DARLA20
	tristate "(Echoaudio) Darla20"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Darla.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-darla20

config SND_GINA20
	tristate "(Echoaudio) Gina20"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Gina.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-gina20

config SND_LAYLA20
	tristate "(Echoaudio) Layla20"
	depends on SND
	depends on FW_LOADER
	select SND_RAWMIDI
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Layla.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-layla20

config SND_DARLA24
	tristate "(Echoaudio) Darla24"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Darla24.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-darla24

config SND_GINA24
	tristate "(Echoaudio) Gina24"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Gina24.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-gina24

config SND_LAYLA24
	tristate "(Echoaudio) Layla24"
	depends on SND
	depends on FW_LOADER
	select SND_RAWMIDI
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Layla24.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-layla24

config SND_MONA
	tristate "(Echoaudio) Mona"
	depends on SND
	depends on FW_LOADER
	select SND_RAWMIDI
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Mona.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-mona

config SND_MIA
	tristate "(Echoaudio) Mia"
	depends on SND
	depends on FW_LOADER
	select SND_RAWMIDI
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Mia and Mia-midi.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-mia

config SND_ECHO3G
	tristate "(Echoaudio) 3G cards"
	depends on SND
	depends on FW_LOADER
	select SND_RAWMIDI
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Gina3G and Layla3G.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-echo3g

config SND_INDIGO
	tristate "(Echoaudio) Indigo"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Indigo.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-indigo

config SND_INDIGOIO
	tristate "(Echoaudio) Indigo IO"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Indigo IO.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-indigoio

config SND_INDIGODJ
	tristate "(Echoaudio) Indigo DJ"
	depends on SND
	depends on FW_LOADER
	select SND_PCM
	help
	  Say 'Y' or 'M' to include support for Echoaudio Indigo DJ.

	  To compile this driver as a module, choose M here: the module
	  will be called snd-indigodj

config SND_EMU10K1
	tristate "Emu10k1 (SB Live!, Audigy, E-mu APS)"
	depends on SND
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ obj-$(CONFIG_SND) += \
	ca0106/ \
	cs46xx/ \
	cs5535audio/ \
	echoaudio/ \
	emu10k1/ \
	hda/ \
	ice1712/ \
+17 −0
Original line number Diff line number Diff line
#
# Makefile for ALSA Echoaudio soundcard drivers
# Copyright (c) 2003 by Giuliano Pochini <pochini@shiny.it>
#

snd-darla20-objs := darla20.o
snd-gina20-objs := gina20.o
snd-layla20-objs := layla20.o
snd-darla24-objs := darla24.o
snd-gina24-objs := gina24.o
snd-layla24-objs := layla24.o
snd-mona-objs := mona.o
snd-mia-objs := mia.o
snd-echo3g-objs := echo3g.o
snd-indigo-objs := indigo.o
snd-indigoio-objs := indigoio.o
snd-indigodj-objs := indigodj.o
+99 −0
Original line number Diff line number Diff line
/*
 *  ALSA driver for Echoaudio soundcards.
 *  Copyright (C) 2003-2004 Giuliano Pochini <pochini@shiny.it>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#define ECHOGALS_FAMILY
#define ECHOCARD_DARLA20
#define ECHOCARD_NAME "Darla20"
#define ECHOCARD_HAS_MONITOR

/* Pipe indexes */
#define PX_ANALOG_OUT	0	/* 8 */
#define PX_DIGITAL_OUT	8	/* 0 */
#define PX_ANALOG_IN	8	/* 2 */
#define PX_DIGITAL_IN	10	/* 0 */
#define PX_NUM		10

/* Bus indexes */
#define BX_ANALOG_OUT	0	/* 8 */
#define BX_DIGITAL_OUT	8	/* 0 */
#define BX_ANALOG_IN	8	/* 2 */
#define BX_DIGITAL_IN	10	/* 0 */
#define BX_NUM		10


#include <sound/driver.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <linux/firmware.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/asoundef.h>
#include <sound/initval.h>
#include <asm/io.h>
#include <asm/atomic.h>
#include "echoaudio.h"

#define FW_DARLA20_DSP	0

static const struct firmware card_fw[] = {
	{0, "darla20_dsp.fw"}
};

static struct pci_device_id snd_echo_ids[] = {
	{0x1057, 0x1801, 0xECC0, 0x0010, 0, 0, 0},	/* DSP 56301 Darla20 rev.0 */
	{0,}
};

static struct snd_pcm_hardware pcm_hardware_skel = {
	.info = SNDRV_PCM_INFO_MMAP |
		SNDRV_PCM_INFO_INTERLEAVED |
		SNDRV_PCM_INFO_BLOCK_TRANSFER |
		SNDRV_PCM_INFO_MMAP_VALID |
		SNDRV_PCM_INFO_PAUSE |
		SNDRV_PCM_INFO_SYNC_START,
	.formats =	SNDRV_PCM_FMTBIT_U8 |
			SNDRV_PCM_FMTBIT_S16_LE |
			SNDRV_PCM_FMTBIT_S24_3LE |
			SNDRV_PCM_FMTBIT_S32_LE |
			SNDRV_PCM_FMTBIT_S32_BE,
	.rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
	.rate_min = 44100,
	.rate_max = 48000,
	.channels_min = 1,
	.channels_max = 2,
	.buffer_bytes_max = 262144,
	.period_bytes_min = 32,
	.period_bytes_max = 131072,
	.periods_min = 2,
	.periods_max = 220,
	/* One page (4k) contains 512 instructions. I don't know if the hw
	supports lists longer than this. In this case periods_max=220 is a
	safe limit to make sure the list never exceeds 512 instructions. */
};


#include "darla20_dsp.c"
#include "echoaudio_dsp.c"
#include "echoaudio.c"
Loading