All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: hdegoede@redhat.com, alsa-devel@alsa-project.org,
	broonie@kernel.org, pierre-louis.bossart@linux.intel.com,
	tiwai@suse.com
Subject: Re: [PATCH] ASoC: Intel: Unify HDAudio-ext bus initialization
Date: Tue, 19 Oct 2021 12:16:40 +0300 (EEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2110191203390.3554566@eliteleevi.tm.intel.com> (raw)
In-Reply-To: <20211018192134.353931-1-cezary.rojewski@intel.com>

Hey,

On Mon, 18 Oct 2021, Cezary Rojewski wrote:

> HDAudio-extended bus initialization parts are scattered throughout Intel
> ADSP drivers code. Gather them up in snd_hda_ext_bus_init() to provide
> unified initialization point.
[...]
> --- a/sound/hda/ext/hdac_ext_bus.c
> +++ b/sound/hda/ext/hdac_ext_bus.c
[..]
> -int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev,
> -			const struct hdac_bus_ops *ops,
> -			const struct hdac_ext_bus_ops *ext_ops)
> +int snd_hda_ext_bus_init(struct hda_bus *bus, struct pci_dev *pdev,
> +			 const struct hdac_bus_ops *ops,
> +			 const struct hdac_ext_bus_ops *ext_ops,
> +			 const char *model)
[...]
> -	bus->idx = 0;
> -	bus->cmd_dma_state = true;
> +	base->idx = 0;
> +	base->cmd_dma_state = true;
> +	base->use_posbuf = 1;
> +	base->bdl_pos_adj = 0;
> +	base->sync_write = 1;
> +	bus->pci = pdev;
> +	bus->modelname = model;
> +	bus->mixer_assigned = -1;
> +	mutex_init(&bus->prepare_mutex);

hmm. It's not clear whether we should initialize the regular hdac_bus 
fields in the ext_bus_init(). For plain HDA, these are also initialized
in the caller. E.g. in sound/pci/hda/hda_controller.c.

So if we start cleaning up, should we go further put this in 
snd_hdac_bus_init()? 

Then another is what is the right place for settings like "sync_write = 
1". While this settings applies to all current users of the extended
bus, this is really hw specific setting and not really a property of 
the extended bus, so this feels a bit out-of-place.

Br, Kai

  parent reply	other threads:[~2021-10-19  9:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 19:21 [PATCH] ASoC: Intel: Unify HDAudio-ext bus initialization Cezary Rojewski
2021-10-18 21:18 ` Pierre-Louis Bossart
2021-10-19  8:00   ` Cezary Rojewski
2021-10-19  9:16 ` Kai Vehmanen [this message]
2021-10-19 12:19   ` Cezary Rojewski
2021-10-19 16:58     ` Pierre-Louis Bossart
2021-10-19 17:32       ` Cezary Rojewski
2021-10-19 18:42         ` Pierre-Louis Bossart
2021-10-21 11:02           ` Cezary Rojewski
2021-10-21 17:19             ` Pierre-Louis Bossart
2021-10-21 18:38               ` Cezary Rojewski
2021-10-21 19:08                 ` Pierre-Louis Bossart
2021-10-24 17:42 ` kernel test robot
2021-10-24 17:42   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2110191203390.3554566@eliteleevi.tm.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.