You are not logged in.

#1 2023-07-08 18:46:28

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Only mono audio with alsa

Hi,

I'm configuring my Lenovo ThinkCentre as a "Arch only" pc. I've obtained sound from the inner chipset (Intel C220), but only in mono. This is the first output lines of amixer, I think there is a problem with master channel, that is detected as mono:

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]

Other channels are detected as stereo.

This is my (very simple) /etc/asound.conf

defaults.pcm.card 1
defaults.ctl.card 1

that I make only for selecting pcm as default.

No problems with cables and connectors: the audio output is working in both channels, but they are mono.

Offline

#2 2023-07-08 20:23:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,466
Website

Re: Only mono audio with alsa

The 'Master' channel is always listed as mono (in my experience on several machines at least) and this has never hindered stereo playback in any way.  Are you actually experiencing any problems, or are you just confused by the "mono" indicator from amixer for 'Master'?  Does `speaker-test -c2` alternate between the left and right speakers?

Last edited by Trilby (2023-07-08 20:24:06)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-07-08 20:50:21

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

No, the output is mono, tested via speaker-test -c2. All two channels are identical.

Offline

#4 2023-07-08 21:30:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

All two channels are identical.

The test would produce noice that moves from one speaker to the other after  Do you test this on HeadPhones?
Post the entire amixer output.

that I make only for selecting pcm as default

No, the config you posted selects the second card as default.
Also post "aplay -lL"

Offline

#5 2023-07-08 21:59:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,466
Website

Re: Only mono audio with alsa

Franco_64 wrote:

No, the output is mono, tested via speaker-test -c2. All two channels are identical.

But it actually sent to two channels?  If alsa wasn't sending to different output channels, the "-c2" flag would send to just one output for a bit, then you'd get a period of silence with it saying "2 - Unused" as the channel.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2023-07-09 04:20:24

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

This is the output of aplay -lL:

aplay -lL
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, LG ULTRAGEAR
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
default:CARD=PCH
    HDA Intel PCH, ALC3239 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC3239 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3239 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [LG ULTRAGEAR]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3239 Analog [ALC3239 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and this the complete output of amixer:

amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
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]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 0 [0%] [-17.25dB] [off]
  Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

But it actually sent to two channels?  If alsa wasn't sending to different output channels, the "-c2" flag would send to just one output for a bit, then you'd get a period of silence with it saying "2 - Unused" as the channel.

Yes, the output is send to left and right channel, but is mono. With speaker-test -c2 I hear an uninterrupted mono sound,  centered between the left and right channel, as the output was mono.

Offline

#7 2023-07-09 05:16:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

With speaker-test -c2 I hear an uninterrupted mono sound

Headphones or speaker?
Despite it displaying

 0 - Front Left
 1 - Front Right
Time per period = 5.633773
 0 - Front Left
 1 - Front Right
Time per period = 5.973008
 0 - Front Left
…

Offline

#8 2023-07-09 05:21:09

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

seth wrote:

With speaker-test -c2 I hear an uninterrupted mono sound

Headphones or speaker?
Despite it displaying

Headphone, two models tested.

Offline

#9 2023-07-09 05:28:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

Did you try to jam the plug harder (gently, but fully) into the jack?

seth wrote:

Despite it displaying…?

Do you receive stereo output  via HDMI?

Try the LTS kernel and please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'f:1=<-' ix.io

Offline

#10 2023-07-09 05:36:56

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

This is the output with my current kernel:

http://ix.io/4A8n

I would prefer not to install the LTS kernel, because my system, apart from this problem, works perfectly.

Last edited by Franco_64 (2023-07-09 05:38:33)

Offline

#11 2023-07-09 06:09:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

You can install the LTS kernel next to the regular one (but since this is a rather old chip I've only mild hopes for this - but it's not the ALSA configuration, it's the kernel or HW. Or your ears wink )
The system is ~10 years old, you did have stereo output before switching to arch?

Do you get periods of silence w/ "speaker-test -c5"?
Speaking of which:

seth multiple times wrote:

Despite it displaying

0 - Front Left
1 - Front Right
Time per period = 5.633773
0 - Front Left
1 - Front Right
Time per period = 5.973008
0 - Front Left

Post the speaker-test output.

Offline

#12 2023-07-09 06:21:02

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

speaker-test -c5

speaker-test 1.2.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 5 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
 2 - Unused
 3 - Unused
 4 - Unused

When the system try channels > 1, sound stop, as should be. Output is mono. My ears are ok (I'm an amateur bass player) smile

I haven't tested sound with other OS. I bought this pc for a pittance a week ago, just to use it only with Arch, and I quickly purged Windows before doing any tests.

Offline

#13 2023-07-09 06:33:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

When the system try channels > 1, sound stop, as should be.

">1"?
You're supposed to hear sound for "front left" and "front right" (on different ears), then a pause afterwards.
Boot some live distro (grml) and try the speakers instead of the HPs (though it's harder to hear it also removes an external factor)

Offline

#14 2023-07-09 06:49:43

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

seth wrote:

When the system try channels > 1, sound stop, as should be.

">1"?
You're supposed to hear sound for "front left" and "front right" (on different ears), then a pause afterwards.
Boot some live distro (grml) and try the speakers instead of the HPs (though it's harder to hear it also removes an external factor)

Yes, >, not >= 1

Sound from "front left" and "front right" are perfectly centered (mono).

I'm starting to think it's a hardware problem with my headphone female connector.

Offline

#15 2023-07-09 09:28:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Only mono audio with alsa

Hence the speaker test, a loose jack or if the plug cannot fully enter the jack can cause this (you get both channels on both lanes in a kind of muffled way)

Offline

#16 2023-07-09 13:49:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,466
Website

Re: Only mono audio with alsa

seth wrote:

.. and try the speakers instead of the HPs

This machine may not have (internal) speakers.  External speakers connected via the same jack would not be a very useful test.  But the HDMI output would be if you have a monitor with speakers or any other HDMI audio receiver.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#17 2023-07-10 13:48:09

Franco_64
Member
From: Milano, Italy
Registered: 2021-11-20
Posts: 49

Re: Only mono audio with alsa

I don't have a clue why, but after doing a system update and reboot (haven't rebooted in over 48 hours) the problem cleared up.

I'm having doubts about adding the [SOLVED] tag to this thread, because I didn't do anything to resolve it...

Offline

Board footer

Powered by FluxBB