From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: Prepare to covert Codec/Platform into Component Date: Fri, 1 Sep 2017 05:25:03 +0000 Message-ID: <873787ngjb.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 9D9C0267483 for ; Fri, 1 Sep 2017 07:25:11 +0200 (CEST) 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: Mark Brown Cc: Linux-ALSA , Lars-Peter List-Id: alsa-devel@alsa-project.org 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