alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
357 stars 176 forks source link

snd-aloop working no more on 1.2.7.1 #251

Closed tramchamploo closed 1 year ago

tramchamploo commented 2 years ago
pcm.er4s {
    # Direct hardware access
    type        hw

    # Loopback card name
    #
    # Has to match "id" in the options of the snd-aloop module
    card        "Loopback"

    # Loopback device ID
    device      0

    # Number of audio channels
    #
    # Has to match the number of channels in music player app
    # and in the CamillaDSP input configuration
    channels    2

    # Format of audio stream
    #
    # Has to match the format defined in the
    # of the CamillaDSP input configuration
    format      "FLOAT_LE"

    # Sampling-rate of audio stream
    #
    # Has to match the sampling-rate defined in the
    # CamillaDSP configuration
    rate        48000
}

ctl.er4s {
    type hw
    card "Loopback"
}

This is the .asoundrc I'm using, it worked before this update. Now aplay -L doesn't show this device. Using mpd to play to the Loopback gets snd_pcm_hw_params() failed: Invalid argument. Here's my mpd config:

audio_output {
    type "alsa"
    name "Etymotic ER4S"
    device "er4s"
    format "48000:f:2"
    mixer_type "none"
    replay_gain_handler "none"
    auto_resample "no"
    auto_format "no"
}

resampler {
  plugin "soxr"
  quality "custom"
  precision "28"
  phase_response "50"
  passband_end "91"
  stopband_begin "100"
  attenu

Btw, alsa should really have a detailed specification on asoundrc file. The value of the format option I specify is from a dsp project, otherwise I have no idea what to write here. And according to https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#gaa14b7f26877a812acbb39811364177f8 it's in a totally different format.

perexg commented 1 year ago

The fix was applied through https://github.com/alsa-project/alsa-lib/pull/293 .