Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1608425pxb; Thu, 4 Mar 2021 16:13:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/BuoqZnronzNKHjw+pHs8chyMkFvREwnDZ0sYilllEOPCWY8zEI/9ZP2lb96GGyu13jkw X-Received: by 2002:a05:6e02:b2c:: with SMTP id e12mr6035648ilu.143.1614903219308; Thu, 04 Mar 2021 16:13:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903219; cv=none; d=google.com; s=arc-20160816; b=OYIEX5M55MCf6RDkqlZeT+PjyOQXMm6hDbZ4K/j2UDEbypcEqrctv+CSaEMLlpDpbM nC+INYz7bsC5C1/Ul669c8Z6SJlpwW83oBYd795D5/vqzR9JyUObohtfFblZgXwsJnlG DNP11K3ahAtkVU9dHzhStCaeVgER6gHsWc34Zc6FSnN4P2OCtBO5we7QA8Jjp2uc0Q3k yfanfHyvOOeTorRtNBZ/2OWKeIk2lm/pd3yuy0O6W5I8gZ2VPDjiEcnpseO0O9iRgght yoyN6GtcWQbVFXXnhMW+Hkv3NuSGj/pOLBwaI0ioBd3DCcjFeiYT2ibZ6R+79N8QmJjb HmYw== 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; bh=7SiRD3ZqRsO53aJXYebe1Sj4Tgt5XyJWjfh/kEPgwx8=; b=pvv9pXT+TYd4AmbBUDM7F3M0QOMU6sa57AlQCdlkOfMOOv8vn0W/QfEJahcvWxQyoX 3wUMFQIWXLn1u2PO4Nc/tHKmRXxLJstJnnsd42lGmyARFIFMmj6luITLX6f37GjftITt 1hy6b6c5lJuDJBOS1fufzMfwRM08atcLNYfRHLyNe+ZLhdJ7r2rBU8NQh9kXEJDGFBgn MDJ8WQD4BiHXbwmLMvkFYL9EAK685UQw/upwjJGNJGAocZB1Slw1Az4MAiI6h8RFmPnM lx3TLmBk+4udvjTHLm2jzRm8Ug9yhxDCSLY8EncGJYPilkBhaclApdIDQVnkQ4DPkh+Y afTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si790864iow.89.2021.03.04.16.13.26; Thu, 04 Mar 2021 16:13:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241400AbhCDNkg (ORCPT + 99 others); Thu, 4 Mar 2021 08:40:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:35398 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241361AbhCDNkF (ORCPT ); Thu, 4 Mar 2021 08:40:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7D4DFACBF; Thu, 4 Mar 2021 13:39:24 +0000 (UTC) Date: Thu, 04 Mar 2021 14:39:24 +0100 Message-ID: From: Takashi Iwai To: Vitaly Rodionov Cc: Jaroslav Kysela , Takashi Iwai , , , Subject: Re: [PATCH 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec. In-Reply-To: <20210303182959.5322-3-vitalyr@opensource.cirrus.com> References: <20210303182959.5322-1-vitalyr@opensource.cirrus.com> <20210303182959.5322-3-vitalyr@opensource.cirrus.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") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 03 Mar 2021 19:29:57 +0100, Vitaly Rodionov wrote: > > +static const struct hda_verb cs8409_cs42l42_init_verbs[] = { > + { 0x01, AC_VERB_SET_POWER_STATE, 0x0000 }, /* AFG: D0 */ I guess this power state change is superfluous. The AFG node is already powered up when the codec probe or init is called. > + { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x0020 }, /* GPIO 5 out, 3,4 in */ > + { 0x01, AC_VERB_SET_GPIO_DATA, 0x0000 }, /* GPIO data 0 */ > + { 0x01, AC_VERB_SET_GPIO_MASK, 0x003f }, /* Enable GPIO */ Those are handled in spec->gpio_dir, gpio->data and gpio->mask fields. > + { 0x01, AC_VERB_SET_GPIO_WAKE_MASK, 0x0018 }, /* WAKE from GPIO 3,4 */ > + { 0x47, AC_VERB_SET_PROC_STATE, 0x0001 }, /* Enable VPW processing */ > + { 0x47, AC_VERB_SET_COEF_INDEX, 0x0002 }, /* Configure GPIO 6,7 */ > + { 0x47, AC_VERB_SET_PROC_COEF, 0x0080 }, /* I2C mode */ > + { 0x47, AC_VERB_SET_COEF_INDEX, 0x005b }, /* Set I2C bus speed */ > + { 0x47, AC_VERB_SET_PROC_COEF, 0x0200 }, /* 100kHz I2C_STO = 2 */ Those remaining verbs are good in the init verbs. But I suppose they have to be applied at the resume as well? But... > +static int cs8409_cs42l42_fixup(struct hda_codec *codec) > +{ > + int err = 0; > + struct cs_spec *spec = codec->spec; > + unsigned int pincap = 0; > + > + /* Basic initial sequence for specific hw configuration */ > + snd_hda_sequence_write(codec, cs8409_cs42l42_init_verbs); ... it seems applied only at the fixup call at parsing? Ditto about cs8409_cs42l42_hw_init(codec). thanks, Takashi