alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
	ALSA development <alsa-devel@alsa-project.org>,
	Kailang <kailang@realtek.com>
Subject: Re: [alsa-devel] [PATCH] ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen
Date: Tue, 11 Feb 2020 14:41:50 +0900	[thread overview]
Message-ID: <20200211054150.GA3119@f3> (raw)
In-Reply-To: <026068c1-7189-762f-d0e7-16ef08a9de3d@perex.cz>

On 2020/02/10 13:54 +0100, Jaroslav Kysela wrote:
> Dne 10. 02. 20 v 13:14 Benjamin Poirier napsal(a):
[...]
> > 
> > Here's the relevant part of Node 0x17 from /proc/asound/card0/codec#0
> > with different quirks applied and the level of sound output through the
> > speakers:
> > 
> > no quirk
> >    Connection: 3
> >       0x02 0x03 0x06*
> >    -> loud volume
> > ALC285_FIXUP_SPEAKER2_TO_DAC1
> >    Connection: 3
> >       0x02* 0x03 0x06
> >    In-driver Connection: 1
> >       0x02
> >    -> weak volume
> > ALC295_FIXUP_DISABLE_DAC3
> >    Connection: 3
> >       0x02 0x03* 0x06
> >    In-driver Connection: 2
> >       0x02 0x03
> >    -> loud volume
> 
> Kailang, what's the difference between nodes 0x02 and 0x03 for this codec?
> Or the DACs are setup differently?
> 
> The problem with those Realtek codecs is that they have many "hidden"
> functions controlled by the undocumented registers.
> 
> I have not tested 0x03. Also, both pair of stereo speakers should be
> connected to one DAC for X1 otherwise we will lose the volume control.

Thanks for your reply, however, that statement is incorrect.

The bass speakers don't need to be connected to the same DAC as the
front speakers. In fact, I found that it's better to connect them to
different DACs: that gives louder max volume and that also gives
individual control for front and bass speakers. But it has to be the
right DACs: 0x02 and 0x03, not 0x02 and 0x06!

As I wrote in my first mail in this thread,
> Applying the following diff brings the volume back to previous levels
> and brings functional volume control:
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm not suggesting to simply revert commit d2cd795c4ece ("ALSA: hda -
fixup for the bass speaker on Lenovo Carbon X1 7th gen"), I'm suggesting
to use a different quirk.

I went back and collected detailed observations regarding the mixer
controls with each quirk.
pavucontrol controls are reported with the device configured with the
"Analog Surround 4.0 Output" profile.

no quirk
	-> Loud max output volume
	DAC connection
	  Connection: 3
	     0x02 0x03 0x06*
	Controls in alsamixer
		Master controls front speakers only.
		Speaker controls front speakers only.
		Bass Speaker is a toggle that mutes everything.
		PCM controls all speakers.
		There is no "Front" mixer.
	Controls in pavucontrol
		"Front Left"/"Front Right" sliders work as expected.
		"Rear Left"/"Rear Right" sliders seem to operate in a
		non-linear fashion such that most values above 0% result in
		max volume output. This is probably linked to the fact
		that "Bass Speaker" is just a toggle in alsamixer.
		-> Because the bass speakers (Rear) are more powerful, the
		net effect is that when the channels are linked into a
		single slider, it seems like it has just two modes: mute or
		max.
ALC285_FIXUP_SPEAKER2_TO_DAC1
	-> Weak (~60%) max output volume
	DAC connection
	  Connection: 3
	     0x02* 0x03 0x06
	  In-driver Connection: 1
	     0x02
	Controls in alsamixer
		Master controls all four speakers.
		Speaker controls all four speakers.
		Bass Speaker is a toggle that mutes everything.
		PCM controls all four speakers.
		There is no "Front" mixer.
	Controls in pavucontrol
		"Front Left"/"Front Right" sliders have no effect.
		"Rear Left"/"Rear Right" sliders control both front and
		bass speakers.
		-> Volume control is effective but it's not possible to
		control front and bass speakers individually.
ALC295_FIXUP_DISABLE_DAC3
	-> Loud max output volume
	DAC connection
	  Connection: 3
	     0x02 0x03* 0x06
	  In-driver Connection: 2
	     0x02 0x03
	Controls in alsamixer
		Master controls all speakers.
		Speaker is a toggle that mutes everything.
		Bass Speaker controls bass speakers only.
		PCM controls all speakers.
		Front controls front speakers only.
	Controls in pavucontrol
		"Front Left"/"Front Right" sliders control front speakers
		only.
		"Rear Left"/"Rear Right" sliders control bass speakers
		only.
		-> Volume control is effective and it's possible to control
		each of the four speakers individually.

In summary, ALC295_FIXUP_DISABLE_DAC3 offers the loudest max volume and the
most detailed mixer controls. I'll send patches shortly.

Another interesting fact that I found while looking more into this is
that the Audio device PCI SSID on the Carbon is 0x2292 but the codec
SSID is 0x2293!

If you have access to an X1 7th gen of some sort (Carbon or Yoga),
please post `dmidecode -t system`, `lspci -vnn` and the content of
"/proc/asound/card0/codec#0" so that we can better compare in case of
different behavior.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2020-02-11  5:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 14:40 [alsa-devel] [PATCH] ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen Jaroslav Kysela
2019-11-29 14:45 ` Takashi Iwai
2020-02-10  2:52 ` Benjamin Poirier
2020-02-10  3:04   ` Benjamin Poirier
2020-02-10  9:11     ` Kailang
2020-02-10 12:14       ` Benjamin Poirier
2020-02-10 12:54         ` Jaroslav Kysela
2020-02-11  5:41           ` Benjamin Poirier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200211054150.GA3119@f3 \
    --to=benjamin.poirier@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kailang@realtek.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).