Módulo do kernel Alsa snd-aloop para o servidor 16.04 ou 14.04?

4

Estou tentando gravar áudio de um aplicativo em um servidor com o FFmpeg . Aparentemente, eu preciso de um driver de loopback Alsa para isso. Eu li que isso deve funcionar no Ubuntu 14.04:

modprobe snd-aloop

Infelizmente, isso não está disponível no meu kernel:

  

modprobe: FATAL: módulo snd-aloop não encontrado.

Esta é uma diferença entre as distribuições de servidor e desktop do Ubuntu?

Como posso instalar esse driver?

O googling me leva até aqui: link

Essa página diz que preciso ir até aqui: link

Essa página diz de forma sensata para usar o DKMS: link

No entanto, as instruções do DKMS listam apenas os drivers da Intel: link

Estou sentindo falta de algo?

    
por Brad 10.03.2017 / 01:46

2 respostas

3
  • Bem, eu poderia tentar carregá-lo no Ubuntu 16.04 Desktop Edition (VirtualBox com placa de áudio desativada). Como você pode ver, ele é instalado com o pacote linux-image-extra , que pode ser que você não tenha.

    ~$ modinfo snd-aloop
    
    filename:       /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko
    license:        GPL
    description:    A loopback soundcard
    author:         Jaroslav Kysela <[email protected]>
    srcversion:     0A4CE16C028DAB4BC8260D3
    depends:        snd-pcm,snd
    intree:         Y
    vermagic:       4.4.0-42-generic SMP mod_unload modversions 
    parm:           index:Index value for loopback soundcard. (array of int)
    parm:           id:ID string for loopback soundcard. (array of charp)
    parm:           enable:Enable this loopback soundcard. (array of bool)
    parm:           pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)
    parm:           pcm_notify:Break capture when PCM format/rate/channels changes. (array of int)
    
    ~$ dpkg -S /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko
    
    linux-image-extra-4.4.0-42-generic: /lib/modules/4.4.0-42-generic/kernel/sound/drivers/snd-aloop.ko
    
    ~$ sudo modprobe snd-aloop
    ~$ alsa-info.sh --stdout
    
    upload=true&script=true&cardinfo=
    !!################################
    !!ALSA Information Script v 0.4.64
    !!################################
    
    !!Script ran on: Thu Mar 23 10:28:23 UTC 2017
    
    
    !!Linux Distribution
    !!------------------
    
    Ubuntu 16.04 LTS \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" NAME="Ubuntu" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04 LTS" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" UBUNTU_CODENAME=xenial
    
    
    !!DMI Information
    !!---------------
    
    Manufacturer:      innotek GmbH
    Product Name:      VirtualBox
    Product Version:   1.2
    Firmware Version:  VirtualBox
    
    
    !!Kernel Information
    !!------------------
    
    Kernel release:    4.4.0-42-generic
    Operating System:  GNU/Linux
    Architecture:      x86_64
    Processor:         x86_64
    SMP Enabled:       Yes
    
    
    !!ALSA Version
    !!------------
    
    Driver version:     k4.4.0-42-generic
    Library version:    1.1.0
    Utilities version:  1.1.0
    
    
    !!Loaded ALSA modules
    !!-------------------
    
    snd_aloop
    
    
    !!Sound Servers on this system
    !!----------------------------
    
    Pulseaudio:
          Installed - Yes (/usr/bin/pulseaudio)
          Running - Yes
    
    
    !!Soundcards recognised by ALSA
    !!-----------------------------
    
     0 [Loopback       ]: Loopback - Loopback
                          Loopback 1
    
    
    !!PCI Soundcards installed in the system
    !!--------------------------------------
    
    
    
    !!Advanced information - PCI Vendor/Device/Subsystem ID's
    !!-------------------------------------------------------
    
    
    
    !!Modprobe options (Sound related)
    !!--------------------------------
    
    snd_pcsp: index=-2
    snd_usb_audio: index=-2
    snd_atiixp_modem: index=-2
    snd_intel8x0m: index=-2
    snd_via82xx_modem: index=-2
    snd_atiixp_modem: index=-2
    snd_intel8x0m: index=-2
    snd_via82xx_modem: index=-2
    snd_usb_audio: index=-2
    snd_usb_caiaq: index=-2
    snd_usb_ua101: index=-2
    snd_usb_us122l: index=-2
    snd_usb_usx2y: index=-2
    snd_cmipci: mpu_port=0x330 fm_port=0x388
    snd_pcsp: index=-2
    snd_usb_audio: index=-2
    
    
    !!Loaded sound module options
    !!---------------------------
    
    !!Module: snd_aloop
        enable : Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
        id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
        index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
        pcm_notify : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        pcm_substreams : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
    
    
    !!ALSA Device nodes
    !!-----------------
    
    crw-rw----+ 1 root audio 116,  2 Mar 23 11:18 /dev/snd/controlC0
    crw-rw----+ 1 root audio 116,  4 Mar 23 11:18 /dev/snd/pcmC0D0c
    crw-rw----+ 1 root audio 116,  3 Mar 23 11:18 /dev/snd/pcmC0D0p
    crw-rw----+ 1 root audio 116,  6 Mar 23 11:18 /dev/snd/pcmC0D1c
    crw-rw----+ 1 root audio 116,  5 Mar 23 11:18 /dev/snd/pcmC0D1p
    crw-rw----+ 1 root audio 116,  1 Mar 23 11:18 /dev/snd/seq
    crw-rw----+ 1 root audio 116, 33 Mar 23 11:18 /dev/snd/timer
    
    /dev/snd/by-path:
    total 0
    drwxr-xr-x 2 root root  60 Mar 23 11:18 .
    drwxr-xr-x 3 root root 200 Mar 23 11:18 ..
    lrwxrwxrwx 1 root root  12 Mar 23 11:18 platform-snd_aloop.0 -> ../controlC0
    
    
    !!Aplay/Arecord output
    !!--------------------
    
    APLAY
    
    **** List of PLAYBACK Hardware Devices ****
    card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
      Subdevices: 8/8
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
      Subdevice #4: subdevice #4
      Subdevice #5: subdevice #5
      Subdevice #6: subdevice #6
      Subdevice #7: subdevice #7
    card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
      Subdevices: 8/8
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
      Subdevice #4: subdevice #4
      Subdevice #5: subdevice #5
      Subdevice #6: subdevice #6
      Subdevice #7: subdevice #7
    
    ARECORD
    
    **** List of CAPTURE Hardware Devices ****
    card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
      Subdevices: 8/8
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
      Subdevice #4: subdevice #4
      Subdevice #5: subdevice #5
      Subdevice #6: subdevice #6
      Subdevice #7: subdevice #7
    card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
      Subdevices: 8/8
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
      Subdevice #4: subdevice #4
      Subdevice #5: subdevice #5
      Subdevice #6: subdevice #6
      Subdevice #7: subdevice #7
    
    !!Amixer output
    !!-------------
    
    !!-------Mixer controls for card 0 [Loopback]
    
    Card hw:0 'Loopback'/'Loopback 1'
      Mixer name    : 'Loopback Mixer'
      Components    : ''
      Controls      : 97
      Simple ctrls  : 1
    Simple mixer control 'PCM',0
      Capabilities: pvolume
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 255
      Mono:
      Front Left: Playback 255 [100%] [0.00dB]
      Front Right: Playback 255 [100%] [0.00dB]
    ...
    
  • Para uma solução geral, veja:

    Como encontro o pacote que fornece um arquivo?

  • Acabei de verificar um novo Ubuntu 16.04.1 Server. Tem o módulo snd-aloop . O pacote linux-image-extra* foi instalado como dependência do pacote linux-image-generic meta, que também é uma dependência do pacote linux-generic meta. Então, uma solução rápida:

    sudo apt install linux-generic
    
por user.dz 23.03.2017 / 11:31
0

Você é capaz de executar este

alsactl restore -P

Se não for possível, você pode tentar instalar

Servidor Ubuntu: instale o som Alsa e MOC (Music On Console)

Se não conseguir instalar a partir do APT, você pode tentar compilá-lo a partir da fonte, de acordo aqui

Compile

Se nenhum outro estiver trabalhando, sugiro ler isto:

Dispositivo Jack e Loopback como ponte Alsa-to-Jack

    
por Edward Chan JW 17.03.2017 / 04:46

Tags