From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2 5/7] ALSA: hda - Use ops instead of directly accessing chmap helpers Date: Thu, 03 Mar 2016 14:37:02 +0100 Message-ID: References: <1456920208-1172-1-git-send-email-subhransu.s.prusty@intel.com> <1456920208-1172-6-git-send-email-subhransu.s.prusty@intel.com> <20160303112923.GK11154@localhost> <20160303115439.GA17770@subhransu-desktop> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 99AE5260535 for ; Thu, 3 Mar 2016 14:37:03 +0100 (CET) In-Reply-To: <20160303115439.GA17770@subhransu-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Subhransu S. Prusty" Cc: Vinod Koul , patches.audio@intel.com, alsa-devel@alsa-project.org, broonie@kernel.org, lgirdwood@gmail.com List-Id: alsa-devel@alsa-project.org On Thu, 03 Mar 2016 12:54:43 +0100, Subhransu S. Prusty wrote: > > On Thu, Mar 03, 2016 at 12:39:05PM +0100, Takashi Iwai wrote: > > On Thu, 03 Mar 2016 12:29:23 +0100, > > Vinod Koul wrote: > > > > > > On Wed, Mar 02, 2016 at 05:03:10PM +0100, Takashi Iwai wrote: > > > > On Wed, 02 Mar 2016 13:03:26 +0100, > > > > Subhransu S. Prusty wrote: > > > > > > > > > > Added more ops to the chmap object, so most of the helpers can be > > > > > accessed through ops instead instead of directly calling them. > > > > > > > > Too many instead :) > > > > > > > > > With this moving the chmap helpers to core will be easy. > > > > > > > > Well, although I asked about reduction of exported stuff, I don't > > > > think it's worth to put everything in ops. If any of them would be > > > > overridden, it's good to have as an ops. If not, it's fine to have > > > > exported symbols. These are just a few entries, not over 20. > > > > > > I think the thought was that patch_hdmi and ASoC driver will use defaults > > > whereas the patch_nvidia etc will override with their own stuff.. > > > > Yes, but are these new ops overridden actually? > > I think the new ops added with this patch can be removed. They can be kept > as exported APIs and not overriden. > > basically these ones: > + int (*get_active_channels)(int ca); > + void (*setup_channel_mapping)(struct hdmi_chmap *chmap, > + hda_nid_t pin_nid, bool non_pcm, int ca, > + int channels, unsigned char *map, > + bool chmap_set); > + int (*channel_allocation)(struct hdac_device *hdac, int spk_alloc, > + int channels, bool chmap_set, > + bool non_pcm, unsigned char *map); > + struct hdmi_cea_channel_speaker_allocation *(*get_cap_from_ca)(int > ca); > + int (*alsa_chmap_to_spk_mask)(unsigned char c); > + int (*spk_to_alsa_chmap)(int spk); Right, I meant the comment above particularly to the ops added in this patch 5. The first few ops are reasonable. Takashi