Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5652280rwr; Mon, 24 Apr 2023 07:14:17 -0700 (PDT) X-Google-Smtp-Source: AKy350bkQjvyJFNiLPfba2qZvQ13400FVikMRzBRn8q++d/f0uSDM5id8CqXD57/7sZVh9dTIkPj X-Received: by 2002:a05:6a21:3982:b0:ef:8b50:56b7 with SMTP id ad2-20020a056a21398200b000ef8b5056b7mr14999890pzc.60.1682345656791; Mon, 24 Apr 2023 07:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682345656; cv=none; d=google.com; s=arc-20160816; b=0QZYMGsxOX+JhBYEQLr+EY+8UfcKUHIF/nth9jFbx4T5p1pj7EM9KbSyHt0qgsFDfD //bhlLdwZbzUs2zQbwaT+r4Q9z3e6V2rN5rCItZq1Z5FP8CBKfWeeTrFJtZi9HwXVtc3 FHkmbNwqmoAjQ/SEkn2KftNFc5tZgFiAVe5rhqF+q9aRWUfYUs99qUQaZXhDGCh9E14E RBw43g+hpwD+oVx9T1OhGPaEdyVnQO/OC6eUrqCOXwMddUkyJf9w312ZPBpczJw2y8Y0 ytwPIAujoHbhj3IuF0OK3NoVCLhinIYTDJn1yrxz02Kn34O04vxF2/8HwLxMKaEXSXP/ IjgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=GXqrNY3+Igt4r4TAkRIx7j8dPgGRz/yOMGf0gCDYAUI=; b=XrenDhjxWStWQuAoOgOeAJBgZx3TEo+T7v1ZdFBro0Qrpu1GVvfgsK5tvfKm4C+3k4 M7ap+FQj+5WXePFP0EGqp9uE90WAd7x9ehmvG4gWMFz8eNzecB7/UUyWB/xM1YsmAqI8 EyRCLKCLirfYFjVLVxfj+PQb2E7hsXegcKwvwQan6NzezQKwULP9J1i14xNk5Pr7A7rh kOgcFrzCieJ+ExUqNyM7SDUs3EtedABlq8YrM2L5wnNSGYlIpkfuTy/ApsCgx8SdhMBN l7gc2UsijpG++L/His1w3emZuwO+a9o3VGxaWZaZUY60up4ACw+NF+XE5BJ+Z+ESW/R7 tJ/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nrvfye3O; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a63f755000000b00517a4a75528si10697284pgk.162.2023.04.24.07.13.59; Mon, 24 Apr 2023 07:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nrvfye3O; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbjDXOI5 (ORCPT + 99 others); Mon, 24 Apr 2023 10:08:57 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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