mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Reorganized configuration files (card->type removal).
This commit is contained in:
parent
828562a5ee
commit
25947ba008
15 changed files with 136 additions and 1125 deletions
|
|
@ -31,147 +31,6 @@ typedef struct _snd_ctl_elem_value snd_ctl_elem_value_t;
|
||||||
/** CTL event container */
|
/** CTL event container */
|
||||||
typedef struct _snd_ctl_event snd_ctl_event_t;
|
typedef struct _snd_ctl_event snd_ctl_event_t;
|
||||||
|
|
||||||
/** Card type */
|
|
||||||
typedef enum _snd_card_type {
|
|
||||||
/** Gravis UltraSound Classic */
|
|
||||||
SND_CARD_TYPE_GUS_CLASSIC = SNDRV_CARD_TYPE_GUS_CLASSIC,
|
|
||||||
/** Gravis UltraSound Extreme */
|
|
||||||
SND_CARD_TYPE_GUS_EXTREME = SNDRV_CARD_TYPE_GUS_EXTREME,
|
|
||||||
/** Gravis UltraSound ACE */
|
|
||||||
SND_CARD_TYPE_GUS_ACE = SNDRV_CARD_TYPE_GUS_ACE,
|
|
||||||
/** Gravis UltraSound Max */
|
|
||||||
SND_CARD_TYPE_GUS_MAX = SNDRV_CARD_TYPE_GUS_MAX,
|
|
||||||
/** AMD InterWave */
|
|
||||||
SND_CARD_TYPE_AMD_INTERWAVE = SNDRV_CARD_TYPE_AMD_INTERWAVE,
|
|
||||||
/** SoundBlaster v1.0 */
|
|
||||||
SND_CARD_TYPE_SB_10 = SNDRV_CARD_TYPE_SB_10,
|
|
||||||
/** SoundBlaster v2.0 */
|
|
||||||
SND_CARD_TYPE_SB_20 = SNDRV_CARD_TYPE_SB_20,
|
|
||||||
/** SoundBlaster Pro */
|
|
||||||
SND_CARD_TYPE_SB_PRO = SNDRV_CARD_TYPE_SB_PRO,
|
|
||||||
/** SoundBlaster 16 */
|
|
||||||
SND_CARD_TYPE_SB_16 = SNDRV_CARD_TYPE_SB_16,
|
|
||||||
/** SoundBlaster AWE */
|
|
||||||
SND_CARD_TYPE_SB_AWE = SNDRV_CARD_TYPE_SB_AWE,
|
|
||||||
/** ESS ES1688 */
|
|
||||||
SND_CARD_TYPE_ESS_ES1688 = SNDRV_CARD_TYPE_ESS_ES1688,
|
|
||||||
/** Yamaha OPL3 SA2/3 */
|
|
||||||
SND_CARD_TYPE_OPL3_SA2 = SNDRV_CARD_TYPE_OPL3_SA2,
|
|
||||||
/** Mozart */
|
|
||||||
SND_CARD_TYPE_MOZART = SNDRV_CARD_TYPE_MOZART,
|
|
||||||
/** S3 SonicVibes */
|
|
||||||
SND_CARD_TYPE_S3_SONICVIBES = SNDRV_CARD_TYPE_S3_SONICVIBES,
|
|
||||||
/** Ensoniq AudioPCI ES1370 */
|
|
||||||
SND_CARD_TYPE_ENS1370 = SNDRV_CARD_TYPE_ENS1370,
|
|
||||||
/** Ensoniq AudioPCI ES1371 / Creative CT5880 */
|
|
||||||
SND_CARD_TYPE_ENS1371 = SNDRV_CARD_TYPE_ENS1371,
|
|
||||||
/** Cirrus Logic CS4232 */
|
|
||||||
SND_CARD_TYPE_CS4232 = SNDRV_CARD_TYPE_CS4232,
|
|
||||||
/** Cirrus Logic CS4236+ */
|
|
||||||
SND_CARD_TYPE_CS4236 = SNDRV_CARD_TYPE_CS4236,
|
|
||||||
/** AMD InterWave + TEA6330T */
|
|
||||||
SND_CARD_TYPE_AMD_INTERWAVE_STB = SNDRV_CARD_TYPE_AMD_INTERWAVE_STB,
|
|
||||||
/** ESS ES1938 */
|
|
||||||
SND_CARD_TYPE_ESS_ES1938 = SNDRV_CARD_TYPE_ESS_ES1938,
|
|
||||||
/** ESS ES18XX */
|
|
||||||
SND_CARD_TYPE_ESS_ES18XX = SNDRV_CARD_TYPE_ESS_ES18XX,
|
|
||||||
/** Cirus Logic CS4231 */
|
|
||||||
SND_CARD_TYPE_CS4231 = SNDRV_CARD_TYPE_CS4231,
|
|
||||||
/** Opti92x */
|
|
||||||
SND_CARD_TYPE_OPTI92X = SNDRV_CARD_TYPE_OPTI92X,
|
|
||||||
/** Serial MIDI */
|
|
||||||
SND_CARD_TYPE_SERIAL = SNDRV_CARD_TYPE_SERIAL,
|
|
||||||
/** Analog Devices AD1848 */
|
|
||||||
SND_CARD_TYPE_AD1848 = SNDRV_CARD_TYPE_AD1848,
|
|
||||||
/** Trident 4D-Wave DX */
|
|
||||||
SND_CARD_TYPE_TRID4DWAVEDX = SNDRV_CARD_TYPE_TRID4DWAVEDX,
|
|
||||||
/** Trident 4D-Wave NX */
|
|
||||||
SND_CARD_TYPE_TRID4DWAVENX = SNDRV_CARD_TYPE_TRID4DWAVENX,
|
|
||||||
/** Sound Galaxy */
|
|
||||||
SND_CARD_TYPE_SGALAXY = SNDRV_CARD_TYPE_SGALAXY,
|
|
||||||
/** Cirrus Logic CS46xx */
|
|
||||||
SND_CARD_TYPE_CS46XX = SNDRV_CARD_TYPE_CS46XX,
|
|
||||||
/** WaveFront */
|
|
||||||
SND_CARD_TYPE_WAVEFRONT = SNDRV_CARD_TYPE_WAVEFRONT,
|
|
||||||
/** Turtle Beach Tropez */
|
|
||||||
SND_CARD_TYPE_TROPEZ = SNDRV_CARD_TYPE_TROPEZ,
|
|
||||||
/** Turtle Beach Tropez+ */
|
|
||||||
SND_CARD_TYPE_TROPEZPLUS = SNDRV_CARD_TYPE_TROPEZPLUS,
|
|
||||||
/** Turtle Beach Maui */
|
|
||||||
SND_CARD_TYPE_MAUI = SNDRV_CARD_TYPE_MAUI,
|
|
||||||
/** CMI8330 */
|
|
||||||
SND_CARD_TYPE_CMI8330 = SNDRV_CARD_TYPE_CMI8330,
|
|
||||||
/** Dummy (/dev/null) soundcard */
|
|
||||||
SND_CARD_TYPE_DUMMY = SNDRV_CARD_TYPE_DUMMY,
|
|
||||||
/** Avance Logic ALS100 */
|
|
||||||
SND_CARD_TYPE_ALS100 = SNDRV_CARD_TYPE_ALS100,
|
|
||||||
/** Obsolete */
|
|
||||||
SND_CARD_TYPE_SHARE = SNDRV_CARD_TYPE_SHARE,
|
|
||||||
/** SiS SI7018 */
|
|
||||||
SND_CARD_TYPE_SI_7018 = SNDRV_CARD_TYPE_SI_7018,
|
|
||||||
/** Opti93x */
|
|
||||||
SND_CARD_TYPE_OPTI93X = SNDRV_CARD_TYPE_OPTI93X,
|
|
||||||
/** MidiTimePiece AV multiport MIDI */
|
|
||||||
SND_CARD_TYPE_MTPAV = SNDRV_CARD_TYPE_MTPAV,
|
|
||||||
/** Virtual MIDI */
|
|
||||||
SND_CARD_TYPE_VIRMIDI = SNDRV_CARD_TYPE_VIRMIDI,
|
|
||||||
/** EMU10K1 (SB Live, Emu APS) */
|
|
||||||
SND_CARD_TYPE_EMU10K1 = SNDRV_CARD_TYPE_EMU10K1,
|
|
||||||
/** RME Hammerfall */
|
|
||||||
SND_CARD_TYPE_HAMMERFALL = SNDRV_CARD_TYPE_HAMMERFALL,
|
|
||||||
/** RME Hammerfall light */
|
|
||||||
SND_CARD_TYPE_HAMMERFALL_LIGHT = SNDRV_CARD_TYPE_HAMMERFALL_LIGHT,
|
|
||||||
/** ICE1712 (Envy24) */
|
|
||||||
SND_CARD_TYPE_ICE1712 = SNDRV_CARD_TYPE_ICE1712,
|
|
||||||
/** CMI8338 */
|
|
||||||
SND_CARD_TYPE_CMI8338 = SNDRV_CARD_TYPE_CMI8338,
|
|
||||||
/** CMI8738 */
|
|
||||||
SND_CARD_TYPE_CMI8738 = SNDRV_CARD_TYPE_CMI8738,
|
|
||||||
/** Analog Device AD1816A */
|
|
||||||
SND_CARD_TYPE_AD1816A = SNDRV_CARD_TYPE_AD1816A,
|
|
||||||
/** Intel i8x0 */
|
|
||||||
SND_CARD_TYPE_INTEL8X0 = SNDRV_CARD_TYPE_INTEL8X0,
|
|
||||||
/** ESS Maestro 1 (old) */
|
|
||||||
SND_CARD_TYPE_ESS_ESOLDM1 = SNDRV_CARD_TYPE_ESS_ESOLDM1,
|
|
||||||
/** ESS Maestro 2 */
|
|
||||||
SND_CARD_TYPE_ESS_ES1968 = SNDRV_CARD_TYPE_ESS_ES1968,
|
|
||||||
/** ESS Maestro 2E */
|
|
||||||
SND_CARD_TYPE_ESS_ES1978 = SNDRV_CARD_TYPE_ESS_ES1978,
|
|
||||||
/** RME Digi96 */
|
|
||||||
SND_CARD_TYPE_DIGI96 = SNDRV_CARD_TYPE_DIGI96,
|
|
||||||
/** VIA SouthBridge 686A/686B */
|
|
||||||
SND_CARD_TYPE_VIA82C686A = SNDRV_CARD_TYPE_VIA82C686A,
|
|
||||||
/** Forte Media FM801 */
|
|
||||||
SND_CARD_TYPE_FM801 = SNDRV_CARD_TYPE_FM801,
|
|
||||||
/** Aztech AZT2320 */
|
|
||||||
SND_CARD_TYPE_AZT2320 = SNDRV_CARD_TYPE_AZT2320,
|
|
||||||
/** Prodif Plus */
|
|
||||||
SND_CARD_TYPE_PRODIF_PLUS = SNDRV_CARD_TYPE_PRODIF_PLUS,
|
|
||||||
/** Yamaha PCI */
|
|
||||||
SND_CARD_TYPE_YMFPCI = SNDRV_CARD_TYPE_YMFPCI,
|
|
||||||
/** Cirrus Logic CS4281 */
|
|
||||||
SND_CARD_TYPE_CS4281 = SNDRV_CARD_TYPE_CS4281,
|
|
||||||
/** Generic MPU401 UART */
|
|
||||||
SND_CARD_TYPE_MPU401_UART = SNDRV_CARD_TYPE_MPU401_UART,
|
|
||||||
/** Avance Logic ALS4000 */
|
|
||||||
SND_CARD_TYPE_ALS4000 = SNDRV_CARD_TYPE_ALS4000,
|
|
||||||
/** ESS Allegro 1 */
|
|
||||||
SND_CARD_TYPE_ALLEGRO_1 = SNDRV_CARD_TYPE_ALLEGRO_1,
|
|
||||||
/** ESS Allegro */
|
|
||||||
SND_CARD_TYPE_ALLEGRO = SNDRV_CARD_TYPE_ALLEGRO,
|
|
||||||
/** ESS Maestro 3 */
|
|
||||||
SND_CARD_TYPE_MAESTRO3 = SNDRV_CARD_TYPE_MAESTRO3,
|
|
||||||
/** AWACS */
|
|
||||||
SND_CARD_TYPE_AWACS = SNDRV_CARD_TYPE_AWACS,
|
|
||||||
/** NeoMagic NM256AV */
|
|
||||||
SND_CARD_TYPE_NM256AV = SNDRV_CARD_TYPE_NM256AV,
|
|
||||||
/** NeoMagic NM256ZX */
|
|
||||||
SND_CARD_TYPE_NM256ZX = SNDRV_CARD_TYPE_NM256ZX,
|
|
||||||
/** VIA VT8233 bridge */
|
|
||||||
SND_CARD_TYPE_VIA8233 = SNDRV_CARD_TYPE_VIA8233,
|
|
||||||
SND_CARD_TYPE_LAST = SNDRV_CARD_TYPE_LAST,
|
|
||||||
} snd_card_type_t;
|
|
||||||
|
|
||||||
/** CTL element type */
|
/** CTL element type */
|
||||||
typedef enum _snd_ctl_elem_type {
|
typedef enum _snd_ctl_elem_type {
|
||||||
/** Invalid type */
|
/** Invalid type */
|
||||||
|
|
@ -262,9 +121,6 @@ int snd_card_get_index(const char *name);
|
||||||
int snd_card_get_name(int card, char **name);
|
int snd_card_get_name(int card, char **name);
|
||||||
int snd_card_get_longname(int card, char **name);
|
int snd_card_get_longname(int card, char **name);
|
||||||
|
|
||||||
int snd_card_type_string_to_enum(const char *strid, snd_card_type_t *enumid);
|
|
||||||
int snd_card_type_enum_to_string(snd_card_type_t enumid, char **strid);
|
|
||||||
|
|
||||||
int snd_sctl_build(snd_sctl_t **ctl, snd_ctl_t *handle, snd_config_t *config,
|
int snd_sctl_build(snd_sctl_t **ctl, snd_ctl_t *handle, snd_config_t *config,
|
||||||
void *private_data, int mode);
|
void *private_data, int mode);
|
||||||
int snd_sctl_free(snd_sctl_t *handle);
|
int snd_sctl_free(snd_sctl_t *handle);
|
||||||
|
|
@ -350,7 +206,6 @@ int snd_ctl_card_info_malloc(snd_ctl_card_info_t **ptr);
|
||||||
void snd_ctl_card_info_free(snd_ctl_card_info_t *obj);
|
void snd_ctl_card_info_free(snd_ctl_card_info_t *obj);
|
||||||
void snd_ctl_card_info_copy(snd_ctl_card_info_t *dst, const snd_ctl_card_info_t *src);
|
void snd_ctl_card_info_copy(snd_ctl_card_info_t *dst, const snd_ctl_card_info_t *src);
|
||||||
int snd_ctl_card_info_get_card(const snd_ctl_card_info_t *obj);
|
int snd_ctl_card_info_get_card(const snd_ctl_card_info_t *obj);
|
||||||
snd_card_type_t snd_ctl_card_info_get_type(const snd_ctl_card_info_t *obj);
|
|
||||||
const char *snd_ctl_card_info_get_id(const snd_ctl_card_info_t *obj);
|
const char *snd_ctl_card_info_get_id(const snd_ctl_card_info_t *obj);
|
||||||
const char *snd_ctl_card_info_get_driver(const snd_ctl_card_info_t *obj);
|
const char *snd_ctl_card_info_get_driver(const snd_ctl_card_info_t *obj);
|
||||||
const char *snd_ctl_card_info_get_name(const snd_ctl_card_info_t *obj);
|
const char *snd_ctl_card_info_get_name(const snd_ctl_card_info_t *obj);
|
||||||
|
|
|
||||||
725
src/alsa.conf
725
src/alsa.conf
|
|
@ -1,725 +0,0 @@
|
||||||
#
|
|
||||||
# ALSA library configuration file
|
|
||||||
#
|
|
||||||
|
|
||||||
# preload configuration files
|
|
||||||
|
|
||||||
@hooks [
|
|
||||||
{
|
|
||||||
func load
|
|
||||||
files [
|
|
||||||
"/etc/asound.conf"
|
|
||||||
"~/.asoundrc"
|
|
||||||
]
|
|
||||||
errors false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
# defaults
|
|
||||||
|
|
||||||
defaults.ctl.card 0
|
|
||||||
defaults.pcm.card 0
|
|
||||||
defaults.pcm.device 0
|
|
||||||
defaults.pcm.subdevice -1
|
|
||||||
defaults.pcm.front.card defaults.pcm.card
|
|
||||||
defaults.pcm.front.device defaults.pcm.device
|
|
||||||
defaults.pcm.rear.card defaults.pcm.card
|
|
||||||
defaults.pcm.rear.device defaults.pcm.device
|
|
||||||
defaults.pcm.surround40.card defaults.pcm.card
|
|
||||||
defaults.pcm.surround40.device defaults.pcm.device
|
|
||||||
defaults.pcm.surround51.card defaults.pcm.card
|
|
||||||
defaults.pcm.surround51.device defaults.pcm.device
|
|
||||||
defaults.pcm.iec958.card defaults.pcm.device
|
|
||||||
defaults.pcm.iec958.device defaults.pcm.device
|
|
||||||
defaults.rawmidi.card 0
|
|
||||||
defaults.rawmidi.device 0
|
|
||||||
defaults.rawmidi.subdevice -1
|
|
||||||
|
|
||||||
#
|
|
||||||
# PCM interface
|
|
||||||
#
|
|
||||||
|
|
||||||
pcm.hw {
|
|
||||||
@args [ CARD DEV SUBDEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.SUBDEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.subdevice
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type hw
|
|
||||||
card $CARD
|
|
||||||
device $DEV
|
|
||||||
subdevice $SUBDEV
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.plughw {
|
|
||||||
@args [ CARD DEV SUBDEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.SUBDEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.subdevice
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type plug
|
|
||||||
slave.pcm {
|
|
||||||
type hw
|
|
||||||
card $CARD
|
|
||||||
device $DEV
|
|
||||||
subdevice $SUBDEV
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.plug {
|
|
||||||
@args [ SLAVE ]
|
|
||||||
@args.SLAVE {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
type plug
|
|
||||||
slave.pcm $SLAVE
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.shm {
|
|
||||||
@args [ SOCKET PCM ]
|
|
||||||
@args.SOCKET {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
@args.PCM {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
type shm
|
|
||||||
server $SOCKET
|
|
||||||
pcm $PCM
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.tee {
|
|
||||||
@args [ SLAVE FILE FORMAT ]
|
|
||||||
@args.SLAVE {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
@args.FILE {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
@args.FORMAT {
|
|
||||||
type string
|
|
||||||
default raw
|
|
||||||
}
|
|
||||||
type file
|
|
||||||
slave.pcm $SLAVE
|
|
||||||
file $FILE
|
|
||||||
format $FORMAT
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.file {
|
|
||||||
@args [ FILE FORMAT ]
|
|
||||||
@args.FILE {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
@args.FORMAT {
|
|
||||||
type string
|
|
||||||
default raw
|
|
||||||
}
|
|
||||||
type file
|
|
||||||
slave.pcm null
|
|
||||||
file $FILE
|
|
||||||
format $FORMAT
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.null {
|
|
||||||
type null
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.default {
|
|
||||||
type plug
|
|
||||||
slave.pcm {
|
|
||||||
type hw
|
|
||||||
card {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
device {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_PCM_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
subdevice {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.subdevice
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.front {
|
|
||||||
@args [ CARD DEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_FRONT_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.front.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_FRONT_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.front.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.front." $DEV ":CARD=" $CARD
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.rear {
|
|
||||||
@args [ CARD DEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_REAR_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.rear.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_REAR_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.rear.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.rear." $DEV ":CARD=" $CARD
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.center_lfe {
|
|
||||||
@args [ CARD DEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_CENTER_LFE_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.center_lfe.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_CENTER_LFE_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.center_lfe.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.center_lfe." $DEV ":CARD=" $CARD
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.surround40 {
|
|
||||||
@args [ CARD DEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_SURROUND40_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.surround40.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_SURROUND40_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.surround40.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.surround40." $DEV ":CARD=" $CARD
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.surround51 {
|
|
||||||
@args [ CARD DEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_SURROUND51_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.surround51.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_SURROUND51_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.surround51.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.surround51." $DEV ":CARD=" $CARD
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.iec958 {
|
|
||||||
@args [ CARD DEV AES0 AES1 AES2 AES3 ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_IEC958_CARD
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.iec958.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_IEC958_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.pcm.iec958.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.AES0 {
|
|
||||||
type integer
|
|
||||||
# consumer, not-copyright, emphasis-none, mode=0
|
|
||||||
default 0x04
|
|
||||||
}
|
|
||||||
@args.AES1 {
|
|
||||||
type integer
|
|
||||||
# original, PCM coder
|
|
||||||
default 0x82
|
|
||||||
}
|
|
||||||
@args.AES2 {
|
|
||||||
type integer
|
|
||||||
# source and channel
|
|
||||||
default 0x00
|
|
||||||
}
|
|
||||||
@args.AES3 {
|
|
||||||
type integer
|
|
||||||
# fs=48000Hz, clock accuracy=1000ppm
|
|
||||||
default 0x02
|
|
||||||
}
|
|
||||||
@func refer
|
|
||||||
file {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
{
|
|
||||||
@func datadir
|
|
||||||
}
|
|
||||||
"/cards/"
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".conf"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
name {
|
|
||||||
@func concat
|
|
||||||
strings [
|
|
||||||
"cards."
|
|
||||||
{
|
|
||||||
@func card_strtype
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
".pcm.iec958." $DEV ":"
|
|
||||||
"CARD=" $CARD ","
|
|
||||||
"AES0=" $AES0 ","
|
|
||||||
"AES1=" $AES1 ","
|
|
||||||
"AES2=" $AES2 ","
|
|
||||||
"AES3=" $AES3
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.spdif pcm.iec958
|
|
||||||
|
|
||||||
#
|
|
||||||
# Control interface
|
|
||||||
#
|
|
||||||
|
|
||||||
ctl.hw {
|
|
||||||
@args[ CARD ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_CTL_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.ctl.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type hw
|
|
||||||
card $CARD
|
|
||||||
}
|
|
||||||
|
|
||||||
ctl.shm {
|
|
||||||
@args [ SOCKET CTL ]
|
|
||||||
@args.SOCKET {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
@args.CTL {
|
|
||||||
type string
|
|
||||||
}
|
|
||||||
type shm
|
|
||||||
server $SOCKET
|
|
||||||
ctl $CTL
|
|
||||||
}
|
|
||||||
|
|
||||||
ctl.default {
|
|
||||||
type hw
|
|
||||||
card {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_CTL_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.ctl.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# RawMidi interface
|
|
||||||
#
|
|
||||||
|
|
||||||
rawmidi.hw {
|
|
||||||
@args [ CARD DEV SUBDEV ]
|
|
||||||
@args.CARD {
|
|
||||||
type string
|
|
||||||
default {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_RAWMIDI_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.rawmidi.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.DEV {
|
|
||||||
type integer
|
|
||||||
default {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_RAWMIDI_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.rawmidi.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@args.SUBDEV {
|
|
||||||
type integer
|
|
||||||
default -1
|
|
||||||
}
|
|
||||||
type hw
|
|
||||||
card $CARD
|
|
||||||
device $DEV
|
|
||||||
subdevice $SUBDEV
|
|
||||||
}
|
|
||||||
|
|
||||||
rawmidi.default {
|
|
||||||
type hw
|
|
||||||
card {
|
|
||||||
@func getenv
|
|
||||||
vars [
|
|
||||||
ALSA_RAWMIDI_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.rawmidi.card
|
|
||||||
}
|
|
||||||
}
|
|
||||||
device {
|
|
||||||
@func igetenv
|
|
||||||
vars [
|
|
||||||
ALSA_RAWMIDI_DEVICE
|
|
||||||
]
|
|
||||||
default {
|
|
||||||
@func refer
|
|
||||||
name defaults.rawmidi.device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Sequencer interface
|
|
||||||
#
|
|
||||||
|
|
||||||
seq.default {
|
|
||||||
type hw
|
|
||||||
}
|
|
||||||
|
|
||||||
seq.hw {
|
|
||||||
type hw
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
SUBDIRS=cards pcm
|
SUBDIRS=cards pcm
|
||||||
|
|
||||||
cfg_files = alsa.conf cards.conf
|
cfg_files = alsa.conf
|
||||||
|
|
||||||
EXTRA_DIST = $(cfg_files)
|
EXTRA_DIST = $(cfg_files)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,18 @@
|
||||||
# load card-specific configuration files (on request)
|
# load card-specific configuration files (on request)
|
||||||
|
|
||||||
cards.@hooks [
|
cards.@hooks [
|
||||||
|
{
|
||||||
|
func load
|
||||||
|
files [
|
||||||
|
{
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
{ @func datadir }
|
||||||
|
"/cards/aliases.conf"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
{
|
{
|
||||||
func load_for_all_cards
|
func load_for_all_cards
|
||||||
files [
|
files [
|
||||||
|
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
#
|
|
||||||
# Card ID translation table from string to numeric.
|
|
||||||
#
|
|
||||||
|
|
||||||
card.GUS_CLASSIC = 0; # GUS Classic
|
|
||||||
card.GUS_EXTREME = 1; # GUS Extreme
|
|
||||||
card.GUS_ACE = 2; # GUS ACE
|
|
||||||
card.GUS_MAX = 3; # GUS MAX
|
|
||||||
card.AMD_INTERWAVE = 4; # AMD InterWave
|
|
||||||
card.SB_10 = 5; # SoundBlaster v1.0
|
|
||||||
card.SB_20 = 6; # SoundBlaster v2.0
|
|
||||||
card.SB_PRO = 7; # SoundBlaster Pro
|
|
||||||
card.SB_16 = 8; # SoundBlaster 16
|
|
||||||
card.SB_AWE = 9; # SoundBlaster AWE
|
|
||||||
card.ESS_ES1688 = 10; # ESS AudioDrive ESx688
|
|
||||||
card.OPL3_SA2 = 11; # Yamaha OPL3 SA2/SA3
|
|
||||||
card.MOZART = 12; # OAK Mozart
|
|
||||||
card.S3_SONICVIBES = 13; # S3 SonicVibes
|
|
||||||
card.ENS1370 = 14; # Ensoniq ES1370
|
|
||||||
card.ENS1371 = 15; # Ensoniq ES1371
|
|
||||||
card.CS4232 = 16; # CS4232/CS4232A
|
|
||||||
card.CS4236 = 17; # CS4235/CS4236B/CS4237B/CS4238B/CS4239
|
|
||||||
card.AMD_INTERWAVE_STB = 18; # AMD InterWave + TEA6330T
|
|
||||||
card.ESS_ES1938 = 19; # ESS Solo-1 ES1938
|
|
||||||
card.ESS_ES18XX = 20; # ESS AudioDrive ES18XX
|
|
||||||
card.CS4231 = 21; # CS4231
|
|
||||||
card.OPTI92X = 22; # OPTi 92x chipset
|
|
||||||
card.SERIAL = 23; # Serial MIDI driver
|
|
||||||
card.AD1848 = 24; # Generic AD1848 driver
|
|
||||||
card.TRID4DWAVEDX = 25; # Trident 4DWave DX
|
|
||||||
card.TRID4DWAVENX = 26; # Trident 4DWave NX
|
|
||||||
card.SGALAXY = 27; # Aztech Sound Galaxy
|
|
||||||
card.CS46XX = 28; # Sound Fusion CS4610/12/15
|
|
||||||
card.WAVEFRONT = 29; # TB WaveFront generic
|
|
||||||
card.TROPEZ = 30; # TB Tropez
|
|
||||||
card.TROPEZPLUS = 31; # TB Tropez+
|
|
||||||
card.MAUI = 32; # TB Maui
|
|
||||||
card.CMI8330 = 33; # C-Media CMI8330
|
|
||||||
card.DUMMY = 34; # dummy soundcard
|
|
||||||
card.ALS100 = 35; # Avance Logic ALS100
|
|
||||||
card.SHARE = 36; # share soundcard
|
|
||||||
card.SI_7018 = 37; # SiS 7018
|
|
||||||
card.OPTI93X = 38; # OPTi 93x chipset
|
|
||||||
card.MTPAV = 39; # MOTU MidiTimePiece AV multiport MIDI
|
|
||||||
card.VIRMIDI = 40; # Virtual MIDI
|
|
||||||
card.EMU10K1 = 41; # EMU10K1
|
|
||||||
card.HAMMERFALL = 42; # RME Digi9652
|
|
||||||
card.HAMMERFALL_LIGHT = 43; # RME Digi9652, but no expansion card
|
|
||||||
card.ICE1712 = 44; # ICE1712
|
|
||||||
card.CMI8338 = 45; # C-Media CMI8338
|
|
||||||
card.CMI8738 = 46; # C-Media CMI8738
|
|
||||||
card.AD1816A = 47; # ADI SoundPort AD1816A
|
|
||||||
card.INTEL8X0 = 48; # Intel 810/820/830/840/MX440
|
|
||||||
card.ESS_ESOLDM1 = 49; # Maestro 1
|
|
||||||
card.ESS_ES1968 = 50; # Maestro 2
|
|
||||||
card.ESS_ES1978 = 51; # Maestro 2E
|
|
||||||
card.DIGI96 = 52; # RME Digi96
|
|
||||||
card.VIA82C686A = 53; # VIA 82C686A
|
|
||||||
card.FM801 = 54; # FM801
|
|
||||||
card.AZT2320 = 55; # AZT2320
|
|
||||||
card.PRODIF_PLUS = 56; # Marian/Sek'D Prodif Plus
|
|
||||||
card.YMFPCI = 57; # YMF724/740/744/754
|
|
||||||
card.CS4281 = 58; # CS4281
|
|
||||||
card.MPU401_UART = 59; # MPU-401 UART
|
|
||||||
card.ALS4000 = 60; # Avance Logic ALS4000
|
|
||||||
card.ALLEGRO_1 = 61; # ESS Allegro-1
|
|
||||||
card.ALLEGRO = 62; # ESS Allegro
|
|
||||||
card.MAESTRO3 = 63; # ESS Maestro3
|
|
||||||
card.AWACS = 64; # PMac AWACS
|
|
||||||
card.NM256AV = 65; # NM256AV
|
|
||||||
card.NM256ZX = 66; # NM256ZX
|
|
||||||
card.VIA8233 = 67; # VIA VT8233
|
|
||||||
card.PMAC_AWACS = 68; # PMac AWACS
|
|
||||||
card.PMAC_BURGUNDY = 69; # PMac Burgundy
|
|
||||||
card.PMAC_DACA = 70; # PMac DACA
|
|
||||||
card.ALI5451 = 71; # ALi PCI Audio M5451
|
|
||||||
103
src/conf/cards/CMI8338.conf
Normal file
103
src/conf/cards/CMI8338.conf
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
#
|
||||||
|
# Configuration for the CMI8338 chip
|
||||||
|
#
|
||||||
|
|
||||||
|
CMI8338.pcm.front.0 {
|
||||||
|
@args [ CARD ]
|
||||||
|
@args.CARD {
|
||||||
|
type string
|
||||||
|
}
|
||||||
|
type hw
|
||||||
|
card $CARD
|
||||||
|
device 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# 2nd DAC
|
||||||
|
# FIXME: we need a volume attenuator for rear channel.
|
||||||
|
CMI8338.pcm.rear.0 {
|
||||||
|
@args [ CARD ]
|
||||||
|
@args.CARD {
|
||||||
|
type string
|
||||||
|
}
|
||||||
|
type hw
|
||||||
|
card $CARD
|
||||||
|
device 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# for the old CM8738 with 2nd DAC for rear
|
||||||
|
CMI8338.pcm.surround40.0 {
|
||||||
|
@args [ CARD ]
|
||||||
|
@args.CARD {
|
||||||
|
type string
|
||||||
|
}
|
||||||
|
type multi
|
||||||
|
master 1
|
||||||
|
slaves [
|
||||||
|
{
|
||||||
|
pcm {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
"cards.CMI8338.pcm.front.0:CARD=" $CARD
|
||||||
|
]
|
||||||
|
}
|
||||||
|
channels 2
|
||||||
|
}
|
||||||
|
{
|
||||||
|
pcm {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
"cards.CMI8338.pcm.rear.0:CARD=" $CARD
|
||||||
|
]
|
||||||
|
}
|
||||||
|
channels 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
bindings [
|
||||||
|
{ slave 0 channel 0 }
|
||||||
|
{ slave 0 channel 1 }
|
||||||
|
{ slave 1 channel 0 }
|
||||||
|
{ slave 1 channel 1 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CMI8338.pcm.iec958.0 {
|
||||||
|
@args [ CARD DEV AES0 AES1 AES2 AES3 ]
|
||||||
|
@args.CARD {
|
||||||
|
type string
|
||||||
|
}
|
||||||
|
@args.DEV {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
@args.AES0 {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
@args.AES1 {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
@args.AES2 {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
@args.AES3 {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
type hooks
|
||||||
|
hooks.0 {
|
||||||
|
type ctl_elems
|
||||||
|
hook_args [
|
||||||
|
{
|
||||||
|
name "IEC958 Enable"
|
||||||
|
value 1
|
||||||
|
lock true
|
||||||
|
preserve true
|
||||||
|
}
|
||||||
|
{
|
||||||
|
interface PCM
|
||||||
|
name "IEC958 Playback PCM Stream"
|
||||||
|
lock true
|
||||||
|
preserve true
|
||||||
|
value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
alsadir = $(datadir)/alsa/cards
|
alsadir = $(datadir)/alsa/cards
|
||||||
cfg_files = SI_7018.conf EMU10K1.conf TRID4DWAVENX.conf ENS1370.conf \
|
cfg_files = aliases.conf SI7018.conf EMU10K1.conf TRID4DWAVENX.conf ENS1370.conf \
|
||||||
INTEL8X0.conf YMFPCI.conf FM801.conf ICE1712.conf CMIPCI.conf
|
INTEL8X0.conf YMF744.conf FM801.conf ICE1712.conf CMI8338.conf CMI8x38.conf
|
||||||
|
|
||||||
EXTRA_DIST = $(cfg_files)
|
EXTRA_DIST = $(cfg_files)
|
||||||
alsa_DATA = $(cfg_files)
|
alsa_DATA = $(cfg_files)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<confdir:pcm/front.conf>
|
<confdir:pcm/front.conf>
|
||||||
|
|
||||||
SI_7018.pcm.front.0 {
|
SI7018.pcm.front.0 {
|
||||||
@args [ CARD ]
|
@args [ CARD ]
|
||||||
@args.CARD {
|
@args.CARD {
|
||||||
type string
|
type string
|
||||||
|
|
@ -16,7 +16,7 @@ SI_7018.pcm.front.0 {
|
||||||
|
|
||||||
<confdir:pcm/rear.conf>
|
<confdir:pcm/rear.conf>
|
||||||
|
|
||||||
SI_7018.pcm.rear.0 {
|
SI7018.pcm.rear.0 {
|
||||||
@args [ CARD ]
|
@args [ CARD ]
|
||||||
@args.CARD {
|
@args.CARD {
|
||||||
type string
|
type string
|
||||||
|
|
@ -42,7 +42,7 @@ SI_7018.pcm.rear.0 {
|
||||||
|
|
||||||
<confdir:pcm/surround40.conf>
|
<confdir:pcm/surround40.conf>
|
||||||
|
|
||||||
SI_7018.pcm.surround40.0 {
|
SI7018.pcm.surround40.0 {
|
||||||
@args [ CARD ]
|
@args [ CARD ]
|
||||||
@args.CARD {
|
@args.CARD {
|
||||||
type string
|
type string
|
||||||
|
|
@ -53,7 +53,7 @@ SI_7018.pcm.surround40.0 {
|
||||||
pcm {
|
pcm {
|
||||||
@func concat
|
@func concat
|
||||||
strings [
|
strings [
|
||||||
"cards.SI_7018.pcm.front.0:CARD=" $CARD
|
"cards.SI7018.pcm.front.0:CARD=" $CARD
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
channels 2
|
channels 2
|
||||||
|
|
@ -62,7 +62,7 @@ SI_7018.pcm.surround40.0 {
|
||||||
pcm {
|
pcm {
|
||||||
@func concat
|
@func concat
|
||||||
strings [
|
strings [
|
||||||
"cards.SI_7018.pcm.rear.0:CARD=" $CARD
|
"cards.SI7018.pcm.rear.0:CARD=" $CARD
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
channels 2
|
channels 2
|
||||||
11
src/conf/cards/aliases.conf
Normal file
11
src/conf/cards/aliases.conf
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#
|
||||||
|
# Define aliases for various drivers
|
||||||
|
#
|
||||||
|
|
||||||
|
YMF724 cards.YMF744
|
||||||
|
YMF724F cards.YMF744
|
||||||
|
YMF740 cards.YMF744
|
||||||
|
YMF740C cards.YMF744
|
||||||
|
YMF754 cards.YMF744
|
||||||
|
CMI8378 cards.CMI8338
|
||||||
|
'E-mu APS' cards.EMU10K1
|
||||||
|
|
@ -430,7 +430,6 @@ static int string_from_integer(char **dst, long v)
|
||||||
|
|
||||||
int snd_func_private_card_strtype(snd_config_t **dst, snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *src, void *private_data)
|
int snd_func_private_card_strtype(snd_config_t **dst, snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *src, void *private_data)
|
||||||
{
|
{
|
||||||
char *res = NULL;
|
|
||||||
snd_ctl_t *ctl = NULL;
|
snd_ctl_t *ctl = NULL;
|
||||||
snd_ctl_card_info_t *info;
|
snd_ctl_card_info_t *info;
|
||||||
long v;
|
long v;
|
||||||
|
|
@ -449,15 +448,9 @@ int snd_func_private_card_strtype(snd_config_t **dst, snd_config_t *root ATTRIBU
|
||||||
SNDERR("snd_ctl_card_info error: %s", snd_strerror(err));
|
SNDERR("snd_ctl_card_info error: %s", snd_strerror(err));
|
||||||
goto __error;
|
goto __error;
|
||||||
}
|
}
|
||||||
err = snd_card_type_enum_to_string(snd_ctl_card_info_get_type(info), &res);
|
|
||||||
if (err < 0) {
|
|
||||||
SNDERR("snd_card_type_enum_to_string failed for %i", (int)snd_ctl_card_info_get_type(info));
|
|
||||||
goto __error;
|
|
||||||
}
|
|
||||||
err = snd_config_make_string(dst, snd_config_get_id(src));
|
err = snd_config_make_string(dst, snd_config_get_id(src));
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
err = snd_config_set_string(*dst, res);
|
err = snd_config_set_string(*dst, snd_ctl_card_info_get_driver(info));
|
||||||
free(res);
|
|
||||||
__error:
|
__error:
|
||||||
if (ctl)
|
if (ctl)
|
||||||
snd_ctl_close(ctl);
|
snd_ctl_close(ctl);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
EXTRA_LTLIBRARIES = libcontrol.la
|
EXTRA_LTLIBRARIES = libcontrol.la
|
||||||
|
|
||||||
libcontrol_la_SOURCES = cards.c cards_id.c hcontrol.c \
|
libcontrol_la_SOURCES = cards.c hcontrol.c \
|
||||||
control.c control_hw.c control_shm.c \
|
control.c control_hw.c control_shm.c \
|
||||||
setup.c
|
setup.c
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
/*
|
|
||||||
* Control Interface - card ID conversions
|
|
||||||
* Copyright (c) 1998 by Jaroslav Kysela <perex@suse.cz>
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Library General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* 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 Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include "control_local.h"
|
|
||||||
|
|
||||||
#define ALSA_CARDS_FILE DATADIR "/alsa/cards.conf"
|
|
||||||
|
|
||||||
static int build_config(snd_config_t **r_conf)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
snd_input_t *in;
|
|
||||||
snd_config_t *conf, *file;
|
|
||||||
const char *filename = ALSA_CARDS_FILE;
|
|
||||||
|
|
||||||
assert(r_conf);
|
|
||||||
*r_conf = NULL;
|
|
||||||
if ((err = snd_config_update()) < 0)
|
|
||||||
return err;
|
|
||||||
if ((err = snd_config_search(snd_config, "cards_file", &file)) >= 0) {
|
|
||||||
if ((err = snd_config_get_string(file, &filename)) < 0) {
|
|
||||||
SNDERR("cards_file definition must be string");
|
|
||||||
filename = ALSA_CARDS_FILE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((err = snd_input_stdio_open(&in, filename, "r")) < 0) {
|
|
||||||
SNDERR("unable to open configuration file '%s'", filename);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
if ((err = snd_config_top(&conf)) < 0) {
|
|
||||||
SNDERR("config_top");
|
|
||||||
snd_input_close(in);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
if ((err = snd_config_load(conf, in)) < 0) {
|
|
||||||
SNDERR("config load error");
|
|
||||||
snd_config_delete(conf);
|
|
||||||
snd_input_close(in);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
snd_input_close(in);
|
|
||||||
*r_conf = conf;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int snd_card_type_string_to_enum(const char *strid, snd_card_type_t *enumid)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
snd_config_t *conf = NULL, *card;
|
|
||||||
snd_config_iterator_t i, next;
|
|
||||||
|
|
||||||
assert(enumid);
|
|
||||||
*enumid = SND_CARD_TYPE_GUS_CLASSIC;
|
|
||||||
if ((err = build_config(&conf)) < 0)
|
|
||||||
return err;
|
|
||||||
if ((err = snd_config_search(conf, "card", &card)) < 0) {
|
|
||||||
SNDERR("unable to find card definitions");
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
if (snd_config_get_type(card) != SND_CONFIG_TYPE_COMPOUND) {
|
|
||||||
SNDERR("compound type expected");
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
snd_config_for_each(i, next, card) {
|
|
||||||
snd_config_t *n = snd_config_iterator_entry(i);
|
|
||||||
const char *id = snd_config_get_id(n);
|
|
||||||
unsigned long i;
|
|
||||||
if (snd_config_get_type(n) != SND_CONFIG_TYPE_INTEGER) {
|
|
||||||
SNDERR("entry '%s' is invalid", id);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((err = snd_config_get_integer(n, &i)) < 0) {
|
|
||||||
SNDERR("entry '%s' is invalid", id);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!strcmp(id, strid)) {
|
|
||||||
*enumid = i;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
int snd_card_type_enum_to_string(snd_card_type_t enumid, char **strid)
|
|
||||||
{
|
|
||||||
int err;
|
|
||||||
snd_config_t *conf = NULL, *card;
|
|
||||||
snd_config_iterator_t i, next;
|
|
||||||
|
|
||||||
assert(strid);
|
|
||||||
*strid = NULL;
|
|
||||||
if ((err = build_config(&conf)) < 0)
|
|
||||||
return err;
|
|
||||||
if ((err = snd_config_search(conf, "card", &card)) < 0) {
|
|
||||||
SNDERR("unable to find card definitions");
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
if (snd_config_get_type(card) != SND_CONFIG_TYPE_COMPOUND) {
|
|
||||||
SNDERR("compound type expected");
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
snd_config_for_each(i, next, card) {
|
|
||||||
snd_config_t *n = snd_config_iterator_entry(i);
|
|
||||||
const char *id = snd_config_get_id(n);
|
|
||||||
unsigned long i;
|
|
||||||
if (snd_config_get_type(n) != SND_CONFIG_TYPE_INTEGER) {
|
|
||||||
SNDERR("entry '%s' is invalid", id);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((err = snd_config_get_integer(n, &i)) < 0) {
|
|
||||||
SNDERR("entry '%s' is invalid", id);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((unsigned long)enumid == i) {
|
|
||||||
*strid = id ? strdup(id) : NULL;
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
snd_config_delete(conf);
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
@ -987,17 +987,6 @@ int snd_ctl_card_info_get_card(const snd_ctl_card_info_t *obj)
|
||||||
return obj->card;
|
return obj->card;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Get card type from a CTL card info
|
|
||||||
* \param obj CTL card info
|
|
||||||
* \return card type
|
|
||||||
*/
|
|
||||||
snd_card_type_t snd_ctl_card_info_get_type(const snd_ctl_card_info_t *obj)
|
|
||||||
{
|
|
||||||
assert(obj);
|
|
||||||
return snd_int_to_enum(obj->type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get card identificator from a CTL card info
|
* \brief Get card identificator from a CTL card info
|
||||||
* \param obj CTL card info
|
* \param obj CTL card info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue