From patchwork Sat May 9 06:00:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Yau X-Patchwork-Id: 6368511 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B463A9F32E for ; Sat, 9 May 2015 06:01:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B314920304 for ; Sat, 9 May 2015 06:01:04 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3B767202FF for ; Sat, 9 May 2015 06:01:02 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1ABB9260660; Sat, 9 May 2015 08:01:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B1DB72604E4; Sat, 9 May 2015 08:00:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 31A492604ED; Sat, 9 May 2015 08:00:56 +0200 (CEST) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by alsa0.perex.cz (Postfix) with ESMTP id 6B854260455 for ; Sat, 9 May 2015 08:00:50 +0200 (CEST) Received: by obbkp3 with SMTP id kp3so69399532obb.3 for ; Fri, 08 May 2015 23:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CTTw1iASpktDpEf035sRxUmE6MQf8CDY6GK7LnN0lSg=; b=fRnkrITKKZm2KNoEdJaP5kSY3+5H1hCXqVJY9r/xI/iDty3TBSVnt4/H43XQ3qDyG3 eVYApDo4Wmpm6Y/DuIB03hXJ02mqw2tOAKdlrd6UMAs3RLMUk2vMuo8dh+sPvYdbjI2Z 6Z0BPuQeOIMI3yUyvxcingaaS0piAbJAMVgB809xql31cDAjOGJkzh6eFNQ61WJk5weA bxVpymjzdw7zRJ/uAxYLO0obUOJ6RpurWc7BoAfznxQ8GAeWZLUq+11szaohYd7ml5R+ +aFAJ1B0ehdDCmP4AveNqKAm+zYeJGsSULF+aZDmNNbGVUBzg/G2QbKykOckrK6pfRit 103g== MIME-Version: 1.0 X-Received: by 10.202.192.7 with SMTP id q7mr963866oif.85.1431151249329; Fri, 08 May 2015 23:00:49 -0700 (PDT) Received: by 10.202.45.206 with HTTP; Fri, 8 May 2015 23:00:49 -0700 (PDT) In-Reply-To: <4324603.tPLEjaP5mH@luklap.workgroup> References: <2927807.UsnFnTlWVL@luklap.workgroup> <29807127.PULdKhJLmi@luklap.workgroup> <4324603.tPLEjaP5mH@luklap.workgroup> Date: Sat, 9 May 2015 14:00:49 +0800 Message-ID: From: Raymond Yau To: =?UTF-8?B?xYF1a2FzeiBXb2puacWCb3dpY3o=?= , ALSA Development Mailing List , tiwai@suse.de, pulseaudio-discuss@lists.freedesktop.org X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Subject: Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP > > > > http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixe > > > > r/paths/analog-output-headphones.conf > > > > > > > > pulseaudio mute external center/lfe controls when headphone jack is > > > > plugged > > That would be unwanted. > This is common to all notebook using headphone jack and two other jacks to support surround51 or surround71 since pulseaudio mute the other retasked mio jack when headphone jack is plugged > > > > I used hdajackretask to override: > > > PIN ID: 0x15 to "Line out (front)" > https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/patch/sound/pci/hda/patch_realtek.c?id=c3e837bbcc03e39991da5dd1f791c06cde9f7a45 When the static model were used, the jack was configured as line out instead of headphone jack and there is no headphone playback volume -static const struct hda_verb alc888_acer_aspire_4930g_verbs[] = { -/* Enable unsolicited event for HP jack */ - {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, -/* Connect HP out to front */ - {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, -static const struct snd_kcontrol_new alc888_acer_aspire_4930g_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), The jack is configured as headphone jack after the auto parser is used > > Pulseaudio don't know node 0x15 is headphone / Line Out (External > speaker) > > > > select speaker profile mute the headphone playback switch > > Doesn't HP mean HeadPhone? Isn't solution to my problem obvious, namely add > Line out capability to 0x15? > > Are there any side effect if you change the headphone jack to Line Out jack as the jack no longer enable HP amp ? use add_out_jack_modes for create Headphone/Line Out jack mode control to change Headphone to Line Out and vice versa Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 3d2597b..f25cd23 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -180,10 +180,10 @@ static void parse_user_hints(struct hda_codec *codec) /* the following two are just for compatibility */ val = snd_hda_get_bool_hint(codec, "add_out_jack_modes"); if (val >= 0) - spec->add_jack_modes = !!val; + spec->add_out_jack_modes = !!val; val = snd_hda_get_bool_hint(codec, "add_in_jack_modes"); if (val >= 0) spec->add_jack_modes = !!val; @@ -2640,7 +2642,7 @@ static void get_jack_mode_name(struct hda_codec *codec, hda_nid_t pin, static int get_out_jack_num_items(struct hda_codec *codec, hda_nid_t pin) { struct hda_gen_spec *spec = codec->spec; - if (spec->add_jack_modes) { + if (spec->add_out_jack_modes || spec->add_jack_modes) { unsigned int pincap = snd_hda_query_pin_caps(codec, pin); if ((pincap & AC_PINCAP_OUT) && (pincap & AC_PINCAP_HP_DRV)) return 2; @@ -4892,7 +4895,7 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, return err; } - if (spec->add_jack_modes) { + if (spec->add_out_jack_modes || spec->add_jack_modes) { if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { err = create_out_jack_modes(codec, cfg->line_outs, cfg->line_out_pins); diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 56e4139..8d7568b 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -227,6 +227,8 @@ struct hda_gen_spec { unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ unsigned int add_stereo_mix_input:2; /* add aamix as a capture src */ unsigned int add_jack_modes:1; /* add i/o jack mode enum ctls */ + unsigned int add_out_jack_modes:1; unsigned int power_down_unused:1; /* power down unused widgets */ unsigned int dac_min_mute:1; /* minimal = mute for DACs */ _______________________________________________ Alsa-devel mailing list