mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	linux-kernel@vger.kernel.org,
	Taylor Smock <smocktaylor@gmail.com>,
	david.henningsson@canonical.com, joe@perches.com,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [alsa-devel] Audio Jack Out does not work
Date: Thu, 09 Apr 2015 07:27:58 +0200	[thread overview]
Message-ID: <s5h8ue17twh.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAN8cciagfHz_URd=ia5eYwKONw7LYf8GvaBPqbnqnExsygeKLQ@mail.gmail.com>

At Thu, 9 Apr 2015 09:34:05 +0800,
Raymond Yau wrote:
> 
> > > > > > Taylor Smock wrote:
> > > > > > >
> > > > > > > Yes; reverting the patch does fix the problem.
> > > > > >
> > > > > > What if you just adjust the new volume manually without
> > > > > > reverting the
> > > > > > patch?  Run "alsamixer -c0" (or -c1, depending on the setup).
> > > > > > Once
> > > > > > after the setup, run "alsactl store" as root to save as the
> > > > > > system
> > > > > > default volume.
> > > > > >
> > > > > > The renamed volume should have been set in full volume as
> > > > > > default by
> > > > > > the driver, and this shouldn't matter whether PA is new or old.
> > > > > > If
> > > > > > the mixer adjustment isn't kept after relogin or reboot, it
> > > > > > means
> > > > > > that
> > > > > > some user-space stuff overrides it.
> > > > > >
> > > > > > In anyway, please give alsa-info.sh output before and after the
> > > > > > commit.
> > > > > >
> > > > > >
> > > > > > Takashi
> > > > > >
> > > > > > > On Wed, 2015-04-08 at 01:56 +0300, Dan Carpenter wrote:
> > > > > > > > So it's 03ad6a8c93b6df2 ('ALSA: hda - Fix "PCM" name being
> > > > > > > > used
> > > > > > > > on > one
> > > > > > > > DAC when there are two DACs') which causes the problem?
> > > > > > > > Have
> > > > > > > > you
> > > > > > > > tried
> > > > > > > > to just revert that patch?
> > > > > > > >
> > > > > > > > git show 03ad6a8c93b6df2d65c305b5b5f9474068b45bfb | patch -
> > > > > > > > p1 -R
> > > > > > > >
> > > > > > > > regards,
> > > > > > > > dan carpenter
> > > > > > > >
> > > > > > >
> > > > >
> > > > > I ran alsamixer -c0.
> > > > > Headphones did nothing.
> > > > > Speaker+L0 did change headphone volume.
> > > >
> > > > Please elaborate a bit what you're testing and what you expected.
> > > > When you change "Headphone" volume and mute, it did nothing for which
> > > > output?  "Speaker+LO" changes which output and which not?
> > > >
> > > > You seem to have three outputs, one headphone jack on a laptop and
> > > > one
> > > > on a docking station, and there is a built-in speaker.  Since your
> > > > codec has only two DACs, two of three must be tied.
> > > >
> > > > The bad thing is that BIOS pin configuration doesn't set the
> > > > headphone
> > > > pin with the associate number 0x0f but only set it to the dock
> > > > headphone.  Thus the driver assumes that the dock jack is the right
> > > > headphone and handles the laptop headphone as a sub output.
> > > > The commit you spotted took this difference more severely, and now
> > > > you
> > > > see the unexpected mixer assignment.
> > > >
> > > > So, the right "fix" would be rather to correct the pin config.
> > > > For example, try the patch below.
> > > >
> > > > (BTW, what is the product of your laptop model?  A more exact name
> > > > can
> > > >  be filled in the quirk string.)
> > > >
> > > > > PCM also seemed to affect headphone volume.
> > > >
> > > > This is a mixer element added by alsa-lib softvol plugin, and it's
> > > > not
> > > > what the kernel manages.
> > > >
> > > > Judging from the description that this PCM volume affects, you are
> > > > playing without PulseAudio but dmix, I suppose?
> > > >
> > > >
> > > > Takashi
> > > >
> > > > diff --git a/sound/pci/hda/patch_realtek.c
> > > > b/sound/pci/hda/patch_realtek.c
> > > > index 7b5c93e0e78c..9d935e5c008a 100644
> > > > --- a/sound/pci/hda/patch_realtek.c
> > > > +++ b/sound/pci/hda/patch_realtek.c
> > > > @@ -4429,6 +4429,7 @@ enum {
> > > >       ALC269_FIXUP_QUANTA_MUTE,
> > > >       ALC269_FIXUP_LIFEBOOK,
> > > >       ALC269_FIXUP_LIFEBOOK_EXTMIC,
> > > > +     ALC269_FIXUP_FUJITSU_HP_PIN,
> > > >       ALC269_FIXUP_AMIC,
> > > >       ALC269_FIXUP_DMIC,
> > > >       ALC269VB_FIXUP_AMIC,
> > > > @@ -4585,6 +4586,13 @@ static const struct hda_fixup alc269_fixups[]
> > > > = {
> > > >                       { }
> > > >               },
> > > >       },
> > > > +     [ALC269_FIXUP_FUJITSU_HP_PIN] = {
> > > > +             .type = HDA_FIXUP_PINS,
> > > > +             .v.pins = (const struct hda_pintbl[]) {
> > > > +                     { 0x21, 0x0221102f }, /* HP out */
> > > > +                     { }
> > > > +             },
> > > > +     },
> >
> 
> Do you mind explaining the logic of this pin fixup as driver also change
> max channels from 2 to 4 ?
> 
> The parser put one headphone in the line_outs before your patch but type is
> still line
> 
> autoconfig for ALC269VB: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
>    speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
>    hp_outs=1 (0x1a/0x0/0x0/0x0/0x0)
>    mono: mono_out=0x0
>    inputs:
>      Internal Mic=0x12
>      Mic=0x18
> 
> the headphone and dock headphone was put in the hp_outsafter your patch
> 
> autoconfig for ALC269VB: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
>    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
>    hp_outs=2 (0x1a/0x21/0x0/0x0/0x0)
>    mono: mono_out=0x0
>    inputs:
>      Internal Mic=0x12
>      Mic=0x18
> 
> 
> Do the driver need to distinguish between
> 
> notebook with headphone and Dock headphone
> notebook with dual headphone jacks

The former is handled when the dock headphone is a kind of line-out.
Now we handle this laptop as the latter, which fits better in the case
of two DACs.


Takashi

  parent reply	other threads:[~2015-04-09  5:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAD67Mo_N1_uEtjWKcV4+Rkjrvc6kcZuvUgrMPvBURJX0hFaaMA@mail.gmail.com>
2015-04-07 22:56 ` Dan Carpenter
2015-04-08  1:07   ` Taylor Smock
2015-04-08  8:22     ` Takashi Iwai
2015-04-08 13:34       ` Taylor Smock
2015-04-08 14:06         ` Takashi Iwai
2015-04-08 16:34           ` Taylor Smock
2015-04-08 18:57             ` Takashi Iwai
     [not found]               ` <CAN8cciagfHz_URd=ia5eYwKONw7LYf8GvaBPqbnqnExsygeKLQ@mail.gmail.com>
2015-04-09  5:27                 ` Takashi Iwai [this message]
     [not found]   ` <CAN8cciY89MH1p7An-RsRkMbFgdKF3OdYGO1hHV594buOpjSuBw@mail.gmail.com>
2015-04-08  8:07     ` [alsa-devel] " Dan Carpenter
     [not found]       ` <CAN8ccib8mOjUKEEexssF0Xocs4WgnE7n1g-N=og3PbUj2Z-q7w@mail.gmail.com>
2015-04-08 15:20         ` Dan Carpenter

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=s5h8ue17twh.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dan.carpenter@oracle.com \
    --cc=david.henningsson@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smocktaylor@gmail.com \
    --cc=superquad.vortex2@gmail.com \
    /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

all inboxes | Powered by JetHome®