You are not logged in.

#1 2022-07-22 07:48:27

linuxyz
Member
Registered: 2021-12-28
Posts: 2

[SOLVED] [ALSA]"Channels count (1) not available.

I've got sound when playing audio on VLC but I can't get 'speaker-test' to work:

$ speaker-test

speaker-test 1.2.7

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Channels count (1) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

My configuration (My monitor, connected via HDMI) has speakers that I don't use it in fact: I'm using ALC892 Analog).

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [PHL 272S1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

My setting in .asoundrc (I've got sometimes a microphone connected: this works without problem)

...
 pcm.!default{
      type asym
      playback.pcm "hw:1,0"
       capture.pcm "hw:2,0"
 }

ctl.!default {
    type hw
     card 1
}

Thank you!

Last edited by linuxyz (2022-07-22 08:49:20)

Offline

#2 2022-07-22 08:20:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,266

Re: [SOLVED] [ALSA]"Channels count (1) not available.

For the literal error, you are playing a mono channel without conversion on a non mono device, use

speaker-test -c2

instead.

As for that config it  will break simultaneous playback of multiple ALSA using utilities. At least the playback PCM should be a proper dmix config node. And there are a few buggy applications that won't know what to do if the default device does not enable the description hint.

So

 pcm.!default{
      type asym
      playback.pcm  { type dmix
       ipc_key 567829
       slave "hw:1,0"
     }
       capture.pcm "hw:2,0"

  hint {
        show on
        description "Default ALSA Output"
    }
 }

ctl.!default {
    type hw
     card 1
}

Also if you use pulseaudio or pipewire remove that conf and opt for pulseaudio-alsa or pipewire-alsa respectively.

Last edited by V1del (2022-07-22 08:28:21)

Offline

#3 2022-07-22 08:48:40

linuxyz
Member
Registered: 2021-12-28
Posts: 2

Re: [SOLVED] [ALSA]"Channels count (1) not available.

V1del wrote:

Also if you use pulseaudio or pipewire remove that conf and opt for pulseaudio-alsa or pipewire-alsa respectively.

I've simply deleted this .asoundrc and everything works now! Thanks a lot.

Offline

Board footer

Powered by FluxBB