[alsa-devel] Can we re-use dw-hdmi-ahb-audio ?

Hi
I know we already have dw-hdmi-ahb-audio.c which is based on normal ALSA style, but I would like to use it as ASoC. I'm thinking that we can separate this existing dw-hdmi-ahb-audio driver into "common parts" and ahb "specific parts", and share common parts with ASoC, like below, but what do you think ?
dw-hdmi-audio.c : dw-hdmi audio common function set dw-hdmi-ahb-audio.c : dw-hdmi audio for ahb, using dw-hdmi-audio.c dw-hdmi-soc-audio.c : dw-hdmi audio for ASoC, using dw-hdmi-audio.c

On Thu, Apr 14, 2016 at 09:08:24AM +0000, Kuninori Morimoto wrote:
I know we already have dw-hdmi-ahb-audio.c which is based on normal ALSA style, but I would like to use it as ASoC. I'm thinking that we can separate this existing dw-hdmi-ahb-audio driver into "common parts" and ahb "specific parts", and share common parts with ASoC, like below, but what do you think ?
dw-hdmi-audio.c : dw-hdmi audio common function set dw-hdmi-ahb-audio.c : dw-hdmi audio for ahb, using dw-hdmi-audio.c dw-hdmi-soc-audio.c : dw-hdmi audio for ASoC, using dw-hdmi-audio.c
Something similar has been done for other things like the PXA drivers in the past. It might get tricky to work out how to instantiate things though.

Hi Mark
dw-hdmi-audio.c : dw-hdmi audio common function set dw-hdmi-ahb-audio.c : dw-hdmi audio for ahb, using dw-hdmi-audio.c dw-hdmi-soc-audio.c : dw-hdmi audio for ASoC, using dw-hdmi-audio.c
Something similar has been done for other things like the PXA drivers in the past. It might get tricky to work out how to instantiate things though.
Thanks. I need investigate more
Best regards --- Kuninori Morimoto
participants (2)
-
Kuninori Morimoto
-
Mark Brown