[alsa-devel] Question: Selecting one codec from multiple codecs using rk3288_hdmi_analog driver

Cheng-yi Chiang cychiang at chromium.org
Wed May 8 07:02:15 CEST 2019


Hi all,
I am wondering whether it is possible to selectively play to one codec
out of multiple codecs.

There is a multiple codec usage in driver rk3288_hdmi_analog:
https://github.com/torvalds/linux/blob/master/sound/soc/rockchip/rk3288_hdmi_analog.c
https://patchwork.kernel.org/patch/9554267/
I am not sure whether the driver supports playing to analog output or
HDMI selectively one at a time ?

I don't have a Firefly-RK3288 board to test that driver, but I have
RK3288 veyron board.
I followed the similar way like that driver does to support max98090
and HDMI on RK3288 veyron board. However, when I play to the device,
it goes to both max98090 and HDMI codec.
>From rk3288_hdmi_analog implementation, I failed to find out how to
turn off HDMI codec when HDMI path is unwanted.
The DAPM pin switch "HDMI" does not help since that even if DAPM path
I2S Playback -> TX -> HDMI is turned off, the startup ops of HDMI
codec is still called from soc_pcm_open path.

Could someone please explain whether this is supported in the framework ?
There seems to be two ways to achieve this
One is to use TDM and select different channel for two codecs.
The second is to add mixer controls and turn codec on/off to disable
codec completely.
But those requires changes on codec driver and the capability of TDM
or mixer control on each codec.
Maybe there should be a way to bypass startup ops of one of multiple
codecs if it is unwanted ?

Any help or suggestion is appreciated. Thanks!


More information about the Alsa-devel mailing list