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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B0ACC7618E for ; Mon, 24 Apr 2023 14:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230399AbjDXOI6 (ORCPT ); Mon, 24 Apr 2023 10:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbjDXOIz (ORCPT ); Mon, 24 Apr 2023 10:08:55 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEF3A6EA8 for ; Mon, 24 Apr 2023 07:08:52 -0700 (PDT) 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 Cc: "perex@perex.cz" , "tiwai@suse.com" , "linux-kernel@vger.kernel.org" , "Jason Tao(SH-RD)" , "alsa-devel@alsa-project.org" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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