All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: hdegoede@redhat.com, alsa-devel@alsa-project.org,
	broonie@kernel.org, tiwai@suse.com
Subject: Re: [PATCH] ASoC: Intel: Unify HDAudio-ext bus initialization
Date: Tue, 19 Oct 2021 19:32:55 +0200	[thread overview]
Message-ID: <d8b90004-6c64-8cef-266a-17b2a4a480d7@intel.com> (raw)
In-Reply-To: <25811f8f-c7bc-89c2-f616-4102293a2deb@linux.intel.com>

On 2021-10-19 6:58 PM, Pierre-Louis Bossart wrote:
>>> 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.
>>
>> I'm rather in favor of bigger cleanups. We can definitely move further
>> in the future : )
> 
> I am not opposed to updates in this hdaudio-ext part, but I am in favor
> of less ambitious step-by-step changes.
> 
> a) This is legacy code where the initial authors have moved on, and it's
> very hard to figure out what the intent was. It's quite common to have
> discussion on feature v. bug, see e.g. the discussion we had on this in
> https://github.com/thesofproject/linux/pull/3175#pullrequestreview-772674119
> 
> b) In addition, this code is shared between two teams with separate
> testing/CI capabilities and limited number of commercial/shipping
> devices. There is a very large risk of introducing bugs even with the
> best intentions.
> 
> Before we do any changes in functionality, there are already basic steps
> that can be done, e.g. using consistent naming between variables, the
> existing code is just confusing as can be:
> 
> struct hdac_stream *stream;
> struct hdac_ext_stream *stream;
> struct hdac_stream *hstream;
> struct hdac_ext_stream *hstream;
> 
> I started basic cleanups here:
> https://github.com/thesofproject/linux/pull/3158, I haven't had time to
> complete this because of more important locking issues, but I intend to
> send those clarifications for the next cycle.
> 
> Again before we do large changes let's think of smaller steps and how we
> are going to validate those changes.

Agree, step-by-step is the way to go.

Isn't this patch a 'step' though? This isn't remotely a refactor, just 
gathering of common parts of ext-bus initialization. We could start with 
this so legacy users are unaffected, then have snd_hdac_bus_init() 
updated so snd_hdac_ext_bus_init() is devoid of 'core' fields 
assignments as suggested by Kai.


Regards,
Czarek

  reply	other threads:[~2021-10-19 17:34 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
2021-10-19 12:19   ` Cezary Rojewski
2021-10-19 16:58     ` Pierre-Louis Bossart
2021-10-19 17:32       ` Cezary Rojewski [this message]
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=d8b90004-6c64-8cef-266a-17b2a4a480d7@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=kai.vehmanen@linux.intel.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.