Change default sound card

sezione dedicata ai sistemi operativi alternativi Open Source

Change default sound card

Messaggio da leggereda root » 07/02/2019, 10:03

note:
1 USB sound card
2 internal microphone on USB HD5000 webcam

aplay -L

Codice: Seleziona tutto
null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=Device
    USB PnP Sound Device, USB Audio
    Default Audio Device
front:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Front speakers
surround21:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output


/bin/cat /proc/asound/devices
Codice: Seleziona tutto
  0: [ 0]   : control
 24: [ 0- 0]: digital audio capture
 32: [ 1]   : control
 33:        : timer
 48: [ 1- 0]: digital audio playback
 56: [ 1- 0]: digital audio capture


cat /proc/asound/card0/id
Codice: Seleziona tutto
HD5000


cat /proc/asound/card1/id

Codice: Seleziona tutto
Device


aplay -l

Codice: Seleziona tutto
**** List of PLAYBACK Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


arecord -l

Codice: Seleziona tutto
**** List of CAPTURE Hardware Devices ****
card 0: HD5000 [Microsoft® LifeCam HD-5000], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


so:

USB sound card = card 1
internal microphone on USB HD5000 webcam = card 0
Maurizio
Avatar utente
root
Amministratore
 
Messaggi: 450
Iscritto il: 10/04/2012, 10:55
Località: Turin

Re: Change default sound card

Messaggio da leggereda root » 07/02/2019, 10:05

to se to your USB sound card as the primary sound device (instead the webcam internal microphone) do the following:

nano /etc/asound.conf

Codice: Seleziona tutto
pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}


nano /root/.asoundrc

Codice: Seleziona tutto
pcm.usb
{
    type hw
    card 1
}

pcm.!default
{
    type asym
    playback.pcm
    {
        type plug
        slave.pcm "dmix"
    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}
Maurizio
Avatar utente
root
Amministratore
 
Messaggi: 450
Iscritto il: 10/04/2012, 10:55
Località: Turin


Torna a OpenWRT

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron