All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ASoC: don't use codec hw_write - step [3/6]
@ 2017-11-09  0:18 Kuninori Morimoto
  2017-11-09  0:19 ` [PATCH 1/6] ASoC: don't use codec hw_write on uda1380 Kuninori Morimoto
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-11-09  0:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon


Hi Mark

These are 3/6 step of prepare patches for "replace component".

Some codec drivers are using codec->hw_write, codec->control_data,
but these are very redundant code, and component doesn't want to
have such code.
These patches cleanup it.

You can check whole replace component patch-set on below.
This is one of them

	Subject: Prepare to covert Codec/Platform into Component
	Date: Fri, 01 Sep 2017 14:18:11 +0900

Kuninori Morimoto (6):
  ASoC: don't use codec hw_write on uda1380
  ASoC: don't use codec hw_write on tlv320dac33
  ASoC: don't use codec hw_write on cx20442/omap-ams-delta
  ASoC: don't use codec hw_write on twl6040
  ASoC: don't use codec hw_write on max98926
  ASoC: don't use codec hw_write on max98927

 sound/soc/codecs/cx20442.c     | 23 ++++++++++-------------
 sound/soc/codecs/max98926.c    |  2 +-
 sound/soc/codecs/max98927.c    |  1 -
 sound/soc/codecs/tlv320dac33.c | 12 +++++-------
 sound/soc/codecs/twl6040.c     | 16 ++++++++--------
 sound/soc/codecs/uda1380.c     | 20 ++++++++++----------
 sound/soc/omap/ams-delta.c     |  4 ++--
 7 files changed, 36 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Prepare to covert Codec/Platform into Component
@ 2017-09-01  5:25 Kuninori Morimoto
  2017-09-01  5:42 ` [PATCH 0/6] ASoC don't use codec hw_write/read Kuninori Morimoto
  0 siblings, 1 reply; 10+ messages in thread
From: Kuninori Morimoto @ 2017-09-01  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Lars-Peter


Hi Mark, Lars-Peter

I will post all prepare patches to convert Codec/Platform into
Component.
It has 3 steps.
	1) add new necessary functions
	2) remove/don't use codec hw_write/read
	3) remove/don't use codec reg_cache

If these are accepted, all prepares were completed.
Next, I can post "convert Codec/Platform into Component" patch bomb.
These are too many convert patches, to avoid review issue,
I will post few of them as sample.
	4) sample of don't use rtd->codec
	5) sample of convert Platform into Component
	6) sample of convert Codec into Component

I will post some of "remove" patches too for each steps.
I will re-post all "remove" patches if all are accepted.

For your review, please consider below.
If these are not good, all covert patch doesn't work.

1. use devm_snd_soc_register_component() and
   remove snd_soc_unregister_component()

My patches is using devm_ version function, and removed
unregister function. This is not a big deal

2. New flags.

Because "Codec" and "CPU/Platform" are using different
features, we need to use some new flags.

	.idle_bias_off/on
	.ignore_pmdown_time/pmdown_time

These are because "CPU/Platform" and "Codec" are using
different default value. "Codec" side convert patches
are using these.

	.endianness
	.non_legacy_dai_naming

These are because "Codec" only needs fixup format,
and not use "legacy" DAI name.
"Codec" side convert patches are using these

I added its flags info on each patch.

3. rtd->platform

rtd->platform will be removed.
Now we can find all rtd connected component by using
rtdcom_lookup. rtd->platform will be replaced to
snd_soc_rtdcom_lookup(rtd, DRV_NAME);
Here, DRV_NAME is platform's component driver name.

4. rtd->codec

rtd->codec will be removed.
In soc_bind_dai_link(), It is

	rtd->codec = rtd->codec_dai->codec;

And now, DAI has codec and component pointer.
So, rtd->codec will be replaced into rtd->codec_dai->component.


Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-13  0:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  0:18 [PATCH 0/6] ASoC: don't use codec hw_write - step [3/6] Kuninori Morimoto
2017-11-09  0:19 ` [PATCH 1/6] ASoC: don't use codec hw_write on uda1380 Kuninori Morimoto
2017-11-09  0:19 ` [PATCH 2/6] ASoC: don't use codec hw_write on tlv320dac33 Kuninori Morimoto
2017-11-09  1:04 ` [PATCH 3/6] ASoC: don't use codec hw_write on cx20442/omap-ams-delta Kuninori Morimoto
2017-11-09  1:04 ` [PATCH 4/6] ASoC: don't use codec hw_write on twl6040 Kuninori Morimoto
2017-11-09  1:04 ` [PATCH 5/6] ASoC: don't use codec hw_write on max98926 Kuninori Morimoto
2017-11-09  1:05 ` [PATCH 6/6] ASoC: don't use codec hw_write on max98927 Kuninori Morimoto
2017-11-10 21:27 ` [PATCH 0/6] ASoC: don't use codec hw_write - step [3/6] Mark Brown
2017-11-13  0:20   ` Kuninori Morimoto
  -- strict thread matches above, loose matches on Subject: below --
2017-09-01  5:25 Prepare to covert Codec/Platform into Component Kuninori Morimoto
2017-09-01  5:42 ` [PATCH 0/6] ASoC don't use codec hw_write/read Kuninori Morimoto
2017-09-01  5:46   ` [PATCH 6/6] ASoC: don't use codec hw_write on max98927 Kuninori Morimoto

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.