From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 890A9C17441 for ; Mon, 11 Nov 2019 14:44:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88E2A2246A for ; Mon, 11 Nov 2019 14:44:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="oL/gFK+Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88E2A2246A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 43871166C; Mon, 11 Nov 2019 15:43:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 43871166C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1573483456; bh=gzeQQjls1LGN/jes+uTv/8P55yyuWs4irLyyrJTr+xQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oL/gFK+Qt+Y9Dvpr0oGaqVSL2sOVMiYTCwzmWDGXd+ZOzvnvxYOw44lfN9J8x+Vpw 3DkxxQuNwP1vacHKm0wfWD47s3LOtlWi9hhG3kxzMpKohv4y8ENWrKqpFRmMdGsjVI hk5s0XPrFUNDgGqos+zAZ4yvlUrCw0RQIp2ynkH4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BD0AEF8045D; Mon, 11 Nov 2019 15:43:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CA9CFF804FF; Mon, 11 Nov 2019 15:43:23 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 16C3BF8015C for ; Mon, 11 Nov 2019 15:43:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16C3BF8015C X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1523DAEAB; Mon, 11 Nov 2019 14:43:20 +0000 (UTC) Date: Mon, 11 Nov 2019 15:43:19 +0100 Message-ID: From: Takashi Iwai To: Kai Vehmanen In-Reply-To: References: <20191111133838.21213-1-kai.vehmanen@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 11 Nov 2019 15:15:57 +0100, Kai Vehmanen wrote: > > Hey Takashi, > > On Mon, 11 Nov 2019, Takashi Iwai wrote: > > > On Mon, 11 Nov 2019 14:38:38 +0100, Kai Vehmanen wrote: > >> Apply same logic to pin setup as on previous platforms. Fixes > >> errors in HDMI/DP playback. > > > > Just to be sure: does Tigerlake need the fixed number of 3 dev_num? > > is_haswell_plus() is applied in a few places, and one place is for > > that check. > > yes, that applies as well. OK, applied now. BTW, I think we can clean up these stuff, something like below... Takashi --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -37,25 +37,6 @@ static bool static_hdmi_pcm; module_param(static_hdmi_pcm, bool, 0644); MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); -#define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807) -#define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808) -#define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809) -#define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a) -#define is_kabylake(codec) ((codec)->core.vendor_id == 0x8086280b) -#define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \ - ((codec)->core.vendor_id == 0x80862800)) -#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c) -#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f) -#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812) -#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \ - || is_skylake(codec) || is_broxton(codec) \ - || is_kabylake(codec) || is_geminilake(codec) \ - || is_cannonlake(codec) || is_icelake(codec) \ - || is_tigerlake(codec)) -#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882) -#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883) -#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) - struct hdmi_spec_per_cvt { hda_nid_t cvt_nid; int assigned; @@ -162,6 +143,7 @@ struct hdmi_spec { bool dyn_pin_out; bool dyn_pcm_assign; + bool intel_pin_fixup; /* * Non-generic VIA/NVIDIA specific */ @@ -925,7 +907,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid, return err; } - if (is_haswell_plus(codec)) { + if (spec->intel_pin_fixup) { /* * on recent platforms IEC Coding Type is required for HBR @@ -1709,7 +1691,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) * To simplify the implementation, malloc all * the virtual pins in the initialization statically */ - if (is_haswell_plus(codec)) { + if (spec->intel_pin_fixup) { /* * On Intel platforms, device entries number is * changed dynamically. If there is a DP MST @@ -1758,7 +1740,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) per_pin->dev_id = i; per_pin->non_pcm = false; snd_hda_set_dev_select(codec, pin_nid, i); - if (is_haswell_plus(codec)) + if (spec->intel_pin_fixup) intel_haswell_fixup_connect_list(codec, pin_nid); err = hdmi_read_pin_conn(codec, pin_idx); if (err < 0) @@ -2825,6 +2807,7 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid, spec->vendor_nid = vendor_nid; spec->port_map = port_map; spec->port_num = port_num; + spec->intel_pin_fixup = true; intel_haswell_enable_all_pins(codec, true); intel_haswell_fixup_enable_dp12(codec); _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel