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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A343CC77B61 for ; Mon, 24 Apr 2023 14:10:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B7179F47; Mon, 24 Apr 2023 16:09:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B7179F47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682345416; bh=xf69ypyI52AFdo/h4Cnkg31BQjeW30sVXtgK08OPVOY=; h=Date:From:To:Subject:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Bi8wu8UW1is49mlO+nSphUxROkcQrVoAWsNSjwhPVFIkk26+fLXZ2EmUV9hDxnlUK X7WUHWnBWyAJlq+IBE3MnVoScUzL5kwrMCCSPdAE9N3hJVJ8zqeIixG9bdYVq83CnD /hPOwM8TgnEWNDQwbysiepO9lv86c+ViIlIIqfns= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3E80DF8018A; Mon, 24 Apr 2023 16:09:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39316F8018A; Mon, 24 Apr 2023 16:08:58 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 03ADDF80104 for ; Mon, 24 Apr 2023 16:08:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03ADDF80104 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nrvfye3O; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=lefYgvi5 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6E2D42199B; Mon, 24 Apr 2023 14:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682345331; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GXqrNY3+Igt4r4TAkRIx7j8dPgGRz/yOMGf0gCDYAUI=; b=nrvfye3ObaSTB33zJns7efNr+QI61rSjqdGte1CIY7YnAQa1y+kz0+s5ZI3XWIwyZKWl3Y 0NpPZJ8opFqO87dzj8AxxWRylyc76D2YerFyOGFAO1ox5G4kXtlBGwfNeCCGpBKPUXUYBS ZNAqffD0oD5mvn6VCsz+SFbII4LS/9w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682345331; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GXqrNY3+Igt4r4TAkRIx7j8dPgGRz/yOMGf0gCDYAUI=; b=lefYgvi5/FelDLlCvbfBS5m9ygHXo0V/0CbCWUzZzPld2ZmCZxg3461QDuORCASsvQxPir VQbU4L6QwTOl/GAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 43CF91390E; Mon, 24 Apr 2023 14:08:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9kWHD3ONRmSpNAAAMHmgww (envelope-from ); Mon, 24 Apr 2023 14:08:51 +0000 Date: Mon, 24 Apr 2023 16:08:50 +0200 Message-ID: <87354pwex9.wl-tiwai@suse.de> From: Takashi Iwai To: Reaper Li_OC Subject: Re: =?GB2312?B?tPC4tDogW7/JxNzKx8Csu/jTyrz+XQ==?= Re: [PATCH] ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs. In-Reply-To: References: <20230418083312.5208-1-reaperlioc@glenfly.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: YSXV7DUYAQJJA5G5NMWKXKXCU553A5RQ X-Message-ID-Hash: YSXV7DUYAQJJA5G5NMWKXKXCU553A5RQ X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "tiwai@suse.com" , "linux-kernel@vger.kernel.org" , "Jason Tao(SH-RD)" , "alsa-devel@alsa-project.org" X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sun, 23 Apr 2023 11:15:57 +0200, Reaper Li_OC wrote: > > > Hi > > Thanks, I will also submit to alsa-devel ML at the next time. > > For the listed questions: > > > @@ -1743,6 +1745,8 @@ static int default_bdl_pos_adj(struct azx *chip) > > } > > > > switch (chip->driver_type) { > > + case AZX_DRIVER_GFHDMI: > > + return 128; > > our chip need increase the bdl as there is limitation on hardware, once hdac > interrupt interval is too short, the audio data may get lost. > > > @@ -1859,6 +1863,9 @@ static int azx_first_init(struct azx *chip) > > } > > #endif > > > > + if (chip->driver_type == AZX_DRIVER_GFHDMI) > > + bus->polling_mode = 1; > > Our chip has interrupt upon the CORB/RIRB response, when the codec complete > the command, It sends interrupt and writes response entries to memory, However > on our hardware, the response entries sometimes are not actually synchronized > to memory when driver handle the hdac interrupt. If the RIRB status is not > updated in the hdac interrupt handler, azx_rirb_get_response keeps trying to > receive a response from rirb until 1s timout before enabling polling_mode, > some apps treat it as an error. So for our hardware, need to enable > polling_mode to fix it. > > > --- a/sound/pci/hda/patch_hdmi.c > > +++ b/sound/pci/hda/patch_hdmi.c > > @@ -4489,6 +4489,18 @@ static int patch_via_hdmi(struct hda_codec *codec) > > return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID); > > } > > > > +static int patch_gf_hdmi(struct hda_codec *codec) > > +{ > > + int err; > > + > > + err = patch_generic_hdmi(codec); > > + if (err) > > + return err; > > + > > + codec->no_sticky_stream = 1; > > On our chip, there are two codecs. when stream switch from one codec to > another codec, our hardware need driver to do actual clean-ups in > codec_cleanup_stream for the linked codec, otherwise it can't complete switch > successfully. OK, then please provide those info as comments briefly in relevant places, as well as some details in the commit log. thanks, Takashi