# Soundkarten Reihenfolge

## flammenflitzer

```
flammenflitzer linux # aplay -l

**** Liste der Hardware-Geräte (PLAYBACK) ****

Karte 0: NVidia [HDA NVidia], Gerät 0: ALC888 Analog [ALC888 Analog]

  Sub-Geräte: 0/1

  Sub-Gerät #0: subdevice #0

Karte 0: NVidia [HDA NVidia], Gerät 1: ALC888 Digital [ALC888 Digital]

  Sub-Geräte: 1/1

  Sub-Gerät #0: subdevice #0

Karte 2: NVidia_1 [HDA NVidia], Gerät 3: HDMI 0 [HDMI 0]

  Sub-Geräte: 1/1

  Sub-Gerät #0: subdevice #0

Karte 2: NVidia_1 [HDA NVidia], Gerät 7: HDMI 0 [HDMI 0]

  Sub-Geräte: 1/1

  Sub-Gerät #0: subdevice #0

Karte 2: NVidia_1 [HDA NVidia], Gerät 8: HDMI 0 [HDMI 0]

  Sub-Geräte: 1/1

  Sub-Gerät #0: subdevice #0

Karte 2: NVidia_1 [HDA NVidia], Gerät 9: HDMI 0 [HDMI 0]

  Sub-Geräte: 1/1

  Sub-Gerät #0: subdevice #0
```

```
flammenflitzer linux # lspci -v | grep -i audio

00:0f.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)

01:00.1 Audio device: nVidia Corporation Device 0e0c (rev a1)
```

```
flammenflitzer / # cat /proc/asound/cards

 0 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xefff0000 irq 20

 1 [U0x46d0x9a4    ]: USB-Audio - USB Device 0x46d:0x9a4

                      USB Device 0x46d:0x9a4 at usb-0000:00:0b.1-9.1, high speed

 2 [NVidia_1       ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xedffc000 irq 16
```

```
snd_page_alloc          7002  2 snd_hda_intel,snd_pcm

flammenflitzer / # lsmod | grep snd

snd_seq_dummy           1566  0 

snd_seq_oss            24366  0 

snd_seq_midi_event      5756  1 snd_seq_oss

snd_seq                44361  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_pcm_oss            31178  0 

snd_mixer_oss          12805  1 snd_pcm_oss

snd_hda_codec_hdmi     22771  4 

snd_usb_audio         103059  2 

snd_hwdep               5638  1 snd_usb_audio

snd_usbmidi_lib        17446  1 snd_usb_audio

snd_rawmidi            18163  1 snd_usbmidi_lib

snd_seq_device          5453  4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi

snd_hda_codec_realtek    46079  1 

snd_hda_intel          22299  7 

snd_hda_codec          73751  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel

usbcore               136072  8 dvb_usb_cinergyT2,snd_usb_audio,uvcvideo,dvb_usb,snd_usbmidi_lib,usbhid,ohci_hcd,ehci_hcd

snd_pcm                65692  7 snd_pcm_oss,snd_hda_codec_hdmi,snd_usb_audio,snd_hda_intel,snd_hda_codec

snd_timer              18677  3 snd_seq,snd_pcm

snd_page_alloc          7002  2 snd_hda_intel,snd_pcm
```

Ich möchte die Reihenfolge der Karten festlegen, da es sonst Probleme mit Pulseaudio gibt.

Wie trage ich das in die /etc/modprobe.d/alsa.conf ein?

```

1 Intel Audio snd_hda_intel snd_hda_codec snd_hda_codec_realtek (OnBoard Soundchip)

2 Intel Audio snd_hda_intel snd_hda_codec_hdmi (Nvidia HDMI)

2 snd_usb_audio (WebCam)
```

```
options snd cards_limit=3

option snd_hda_intel index=0

option snd_hda_intel index=1

option snd_usb_audio index=2
```

? Wie unterscheide ich die beiden snd_hda_intel ?

----------

## Josef.95

Schau mal ob dir http://alsa.opensrc.org/MultipleCards#Multiple_devices

weiterhilft.

----------

## flammenflitzer

Habe ich gelesen. Komme ich nicht mit klar.

Ich probiere jetzt 

```
options snd_hda_intel index=0,1

options snd_usb_audio index=2
```

Zutreffend wäre

```
Loading the kernel modules for multiple cards

Frank Barknecht offered this dual card configuration example to the alsa-devel mailing-list.

See TwoCardsAsOne for an idea for setting up an .asoundrc to use two cards together. Read chapter below (a code fix).

# START

alias char-major-116 snd ???

alias char-major-14 soundcore ???

options snd snd_major=116 snd_cards_limit=3 # snd_device_mode=0660 snd_device_gid=29 snd_device_uid=0 ich denke, das brauche ich nicht

# HDA NVidia ALC888

alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss 

alias sound-service-0-1 snd-seq-oss  

alias sound-service-0-3 snd-pcm-oss 

alias sound-service-0-8 snd-seq-oss  

alias sound-service-0-12 snd-pcm-osshree  

# HDA NVidia HDMI

alias sound-slot-1 snd-card-1

alias sound-service-1-0 snd-mixer-oss

#alias sound-service-1-1 snd-seq-oss

alias sound-service-1-3 snd-pcm-oss

#alias sound-service-1-8 snd-seq-oss

alias sound-service-1-12 snd-pcm-oss

# USB-Audio

alias sound-slot-2 snd-card-2

alias sound-service-1-0 snd-mixer-oss

#alias sound-service-1-1 snd-seq-oss

alias sound-service-1-3 snd-pcm-oss

#alias sound-service-1-8 snd-seq-oss

alias sound-service-1-12 snd-pcm-oss

#alias snd-card-0 snd-card-ice1712

alias snd-card-0 snd_hda_intel

options snd-card-hda-intel index=0

#alias snd-card-1 

alias snd-card-1 snd_hda_intel

options snd-card-hda-intel index=1

#alias snd-card-2 

alias snd-card-2 snd_usb_audio 

options snd-card-usb-audio index=2

# END
```

aber wie unterscheide ich ALC888 und HDMI ?

----------

## Dorsai!

Ist das der selbe Thread wie im Gentoo.de Forum? Meinte da einen ähnlichen gesehen zu haben.

Allgemein:

Wenn du zwei Soundkarten hast, die das selbe Modul verwenden UND gleich heißen (NVidia, NVidia), dann hast du kaum eine Chance nur mit der modprobe.conf

```
parm:           index:Index value for Intel HD audio interface. (array of int)

parm:           id:ID string for Intel HD audio interface. (array of charp)

parm:           enable:Enable Intel HD audio interface. (array of bool)

parm:           model:Use the given board model. (array of charp)

parm:           position_fix:DMA pointer read method.(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO). (array of int)

parm:           bdl_pos_adj:BDL position adjustment offset. (array of int)

parm:           probe_mask:Bitmask to probe codecs (default = -1). (array of int)

parm:           probe_only:Only probing and no codec initialization. (array of int)

parm:           single_cmd:Use single command to communicate with codecs (for debugging only). (bool)

parm:           enable_msi:Enable Message Signaled Interrupt (MSI) (int)

parm:           align_buffer_size:Force buffer and period sizes to be multiple of 128 bytes. (bool)

parm:           snoop:Enable/disable snooping (bool)

```

Die asound.conf hilft dir auch nur, wenn die Karten einen unterschiedlichen Namen haben. Dann kannst du sie anstatt der Nummer (hw:0,0) mit dem ID String ansprechen (z.B. hw:NVidiaHDMI,0). 

Den kannst du aber selbst festlegen in dem du eine udev Regel erstellst wie im verlinkten Wiki Artikel beschrieben:

http://alsa.opensrc.org/Udev

Erfordert halt ein bisschen Einlesearbeit.

----------

