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 AE0EBEB64DA for ; Thu, 20 Jul 2023 14:18:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231758AbjGTOSP (ORCPT ); Thu, 20 Jul 2023 10:18:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjGTOSO (ORCPT ); Thu, 20 Jul 2023 10:18:14 -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 F2D5E211D for ; Thu, 20 Jul 2023 07:18:12 -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 B4A0222C6C; Thu, 20 Jul 2023 14:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689862691; 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=2amP83fa5zZSlbjt8pOmiwJucj8YYw68bEe3RLres6c=; b=b8+L1zWcTxcG2gOrb48R+FjSCZVzvDweD26ePr6mTRjiRcHirgf2ZFpxDFTRi3S94vccRf jhTIQWknqIRc0ldojk0uVvy+pO3/7v9hgXPdnmZYdiwAuioeFK4C49P58brJ27/dgcJAC+ Pg3+Rzm8sWiPsrlQ4nZHB0ezTY07aY0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689862691; 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=2amP83fa5zZSlbjt8pOmiwJucj8YYw68bEe3RLres6c=; b=FgYNfpzgrzLwBtwMhwJla/WpOxUF0YVGwq0iZlaV2toZEjXkHfLzJKC2gy1WW2K+6lqkiJ 5K0UZSwCxutOEVBQ== 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 81F8C138EC; Thu, 20 Jul 2023 14:18:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YvX4HiNCuWT2bQAAMHmgww (envelope-from ); Thu, 20 Jul 2023 14:18:11 +0000 Date: Thu, 20 Jul 2023 16:18:11 +0200 Message-ID: <87wmyuis4c.wl-tiwai@suse.de> From: Takashi Iwai To: Stefan Binding Cc: Mark Brown , Jaroslav Kysela , Takashi Iwai , , , Subject: Re: [PATCH v1 06/11] ALSA: hda: hda_component: Add pre and post playback hooks to hda_component In-Reply-To: <20230720133147.1294337-7-sbinding@opensource.cirrus.com> References: <20230720133147.1294337-1-sbinding@opensource.cirrus.com> <20230720133147.1294337-7-sbinding@opensource.cirrus.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 Thu, 20 Jul 2023 15:31:42 +0200, Stefan Binding wrote: > > These hooks can be used to add callbacks that would be run before and after > the main playback hooks. These hooks would be called for all amps, before > moving on to the next hook, i.e. pre_playback_hook would be called for > all amps, before the playback_hook is called for all amps, then finally > the post_playback_hook is called for all amps. > > Signed-off-by: Stefan Binding It's better to combine this and patch 9 for the actual calls, so that we know the full effect of the changes. thanks, Takashi > --- > sound/pci/hda/hda_component.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/pci/hda/hda_component.h b/sound/pci/hda/hda_component.h > index 534e845b9cd1d..f170aec967c18 100644 > --- a/sound/pci/hda/hda_component.h > +++ b/sound/pci/hda/hda_component.h > @@ -15,5 +15,7 @@ struct hda_component { > struct device *dev; > char name[HDA_MAX_NAME_SIZE]; > struct hda_codec *codec; > + void (*pre_playback_hook)(struct device *dev, int action); > void (*playback_hook)(struct device *dev, int action); > + void (*post_playback_hook)(struct device *dev, int action); > }; > -- > 2.34.1 >