Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alsa: amixer alsamixer now requires arguments... [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Tue Oct 26, 2021 6:15 pm    Post subject: alsa: amixer alsamixer now requires arguments... [solved] Reply with quote

Had not problem with alsa for years now.
Currently, both amixer and alsamixer commands fail.
Code:
user@amd64 ~ $ amixer
amixer: Mixer attach default error: L'hôte cible est arrêté ou en panne
user@amd64 ~ $ alsamixer
cannot open mixer: L'hôte cible est arrêté ou en panne
As a side note: Did the libxcrypt switch before such issues.
Thks 4 ur attention, interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.


Last edited by CaptainBlood on Mon Nov 01, 2021 2:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Oct 26, 2021 7:20 pm    Post subject: Reply with quote

Please post your /etc/asound.conf, your ~/.asoundrc and the output of
Code:
aplay -l
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Tue Oct 26, 2021 7:34 pm    Post subject: Reply with quote

Code:
LC_MESSAGES=C cat /etc/asound.conf
cat: /etc/asound.conf: No such file or directory
Code:
user@amd64 ~ $ cat .asoundrc
# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

# ------------------------------------------------------
# default device
pcm.!default {
  type plug
  slave.pcm "aloopDuplex"
}

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    channels 6
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}
Code:
user@amd64 ~ $ LC_MESSAGES=C aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 7/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 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 7/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
Thks 4 ur attention, interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Oct 26, 2021 8:00 pm    Post subject: Reply with quote

So your physical interface seems to be card 0, device 0, right?

Do amixer and alsmixer work if you (temporarily) rename your .asoundrc?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Tue Oct 26, 2021 8:11 pm    Post subject: Reply with quote

Code:
user@amd64 ~ $ mv .asoundrc .asoundrc.ok
user@amd64 ~ $ LC_MESSAGES=C amixer
amixer: Mixer attach default error: Host is down
user@amd64 ~ $ LC_MESSAGES=C alsamixer
cannot open mixer: Host is down
Thks 4 ur attention, interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Oct 26, 2021 8:21 pm    Post subject: Reply with quote

Does
Code:
alsamixer -c 0 -D 0

work?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Tue Oct 26, 2021 8:36 pm    Post subject: Reply with quote

mike155 wrote:
So your physical interface seems to be card 0, device 0, right?
Code:
alsamixer -c 0
does the trick... :D
First time I have to provide parameters to the command...

I'd wish I could put things back as they were... :cry:

Thks 4 ur attention, interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.


Last edited by CaptainBlood on Tue Oct 26, 2021 9:08 pm; edited 2 times in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Oct 26, 2021 9:06 pm    Post subject: Reply with quote

Wait! We're not done yet! :)

If you start alsamixer with "-c0", alsamixer will attach directly to card 0, your physical interface. I'm glad it works, because it means that ALSA works.

If you start alsamixer without "-c0", it will attach to the default device, which is by default also card 0. But in your .asoundrc, you define a different default device:
Code:
# default device
pcm.!default {
  type plug
  slave.pcm "aloopDuplex"
}

And this device doesn't work.

It looks like many entries in your .soundrc are related to Jack. Do you use Jack? Do you want it? If not, it's probably best to remove your .asoundrc.

If you want to use Jack, you should try to find out what's wrong there. I'm afraid I won't be able to help you, because I don't know anything about Jack.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Tue Oct 26, 2021 9:28 pm    Post subject: Reply with quote

Yes, using jack as main sound stack, with alsa entry and output.

apulse here, instead of pulseaudio...

I've always found .asoundrc not understandable...

Guess I'll have to dive into that one day... :roll:

Thks 4 ur attention, interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.
Back to top
View user's profile Send private message
Shaorin
n00b
n00b


Joined: 26 Aug 2020
Posts: 23
Location: Sweden

PostPosted: Wed Oct 27, 2021 4:45 pm    Post subject: Reply with quote

you can try instead of calling it 0 write the name of the sound device

Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault
    Default Audio Device
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
sysdefault:CARD=Sound
    HyperX Virtual Surround Sound, USB Audio
    Default Audio Device
front:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    Front output / input
surround21:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Sound,DEV=0
    HyperX Virtual Surround Sound, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=Sound
    HyperX Virtual Surround Sound
    USB Stream Output


mine is called Sound as you can see and i put in like this.

Code:
#########################################
# kosshi's basic asoundrc tempalte v2.1 #
#########################################

#################
# DEFAULT STUFF #
#################

# Uncomment to get a placebo improvement in resampling.
# May require packages and iirc had some issues with 32bit programs
#defaults.pcm.rate_converter "speexrate"

# This allows you to change the default with ALSA_DEFAULT_PCM env var
pcm.!default {
   @func refer
   name { @func concat
      strings [ "pcm."
         {    @func getenv
            vars [ ALSA_DEFAULT_PCM ]
            default "sym"
         }

      ]
   }
}

pcm.sym {
   type asym;
   playback.pcm "out_mixer_plug"
   capture.pcm  "mic_snoop_plug"
}


###########
#  OUTPUT #
###########


pcm.out_mixer_plug {
   type plug;
   slave.pcm "out_mixer"
}

pcm.out_mixer {
   type dmix;
   ipc_key 1024;
   ipc_perm 0666
   slave {

      # THIS IS YOUR DEFAULT OUTPUT DEVICE !!!
      pcm "hw:Sound,0,0"

      rate 48000
      channels 2
      period_time 0

      # Adjusts latency, this is on high side
      # Some programs may not like short buffers, experiment yourself
      period_size 1024
      buffer_size 8192
   }
}

##############
# MICROPHONE #
##############

pcm.mic_snoop_plug {
   type plug;
   slave.pcm "mic_snoop";
}

pcm.mic_snoop {
    type dsnoop

   ipc_key 4641
   ipc_perm 0666

   # THIS IS YOUR DEFAULT MICROPHONE !!!
   slave.pcm "hw:Sound,0,0"

   slave
   {
      period_time 0

      # Increase if your mic quality sucks
      period_size 1028
      buffer_size 8192
      channels 2
   }
   bindings {
        0 0
        1 1
    }
}

###########
# THE END #
###########


not sure if this helps :)
_________________
sorry if i makes some typos or missunderstand i have dyslexsia and asperger's syndrom thanks for the understanding.
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Sat Oct 30, 2021 3:46 pm    Post subject: Reply with quote

Hi, I don't know exactly how that error message comes from using loopback for pcm, but you can force the default device for mixer control with a line in ~/.asoundrc:
Code:
ctl.!default { type hw; card PCH; }
where PCH is the very beginning of a card description in aplay -l, also the bracketed [ ID ] in that part of /proc/asound/cards.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3586

PostPosted: Mon Nov 01, 2021 2:05 pm    Post subject: Reply with quote

I really appreciate your support.

It so happens, issue has gone away, with no understanding why... :oops:

I raised that thread because a more critical issue, unsolved...

Thks 4 ur attention , interest & support.
_________________
USE="-*" in /etc/portage/make.conf here.
Back to top
View user's profile Send private message
jlm
n00b
n00b


Joined: 27 May 2018
Posts: 49

PostPosted: Sat Aug 20, 2022 9:15 pm    Post subject: Reply with quote

adding some information since I had the same issue

mine came from removing pulseaudio and pipewire[server] from my system (really don't get why theses project still exist, as long as I remember I never had issue with alsa.... not same with these 2... cpu usage, lags, glitches... but I thought that pulse was mandatory now since I saw it on every recent distrib....)

be sure to clean the /etc/alsa/conf.d from remaining conf (pulse or pipewire), this solved the issue on my side
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum