I’m using a HDMI to CSI bridge board with a Toshiba tc358743.
I’ve noticed that running the following:
v4l2-ctl -d /dev/video0 --all
I get the following output:
** audio_sampling_rate 0x00981980 (int) : min=0 max=768000 step=1 default=0 value=48000 flags=read-only**
** audio_present 0x00981981 (bool) : default=0 value=1 flags=read-only**
So it would appear you could query the chip to determine if audio is present. However the only way I can get this to change is by pulling the HDMI cable from the bridge board. If I have an HDMI video going into it with no audio it still shows up as audio is present.
Does anyone know what the audio_present user control means? In other words does it simply mean the cable is plugged in or is it suppose to convey that there is an audio signal?
there’s kernel functions to check the register, i.e.
AU_STATUS0, it’s boolean function to return the states.
you may also enable dynamic debug flags of tc358743.c to examine the behavior.
# echo file tc358743.c +p > /sys/kernel/debug/dynamic_debug/control
Thanks for the response Jerry!
Yup I found the audio_present function in the driver that reads the AU_STATUS0 register.
static inline bool audio_present(struct v4l2_subdev *sd)
return i2c_rd8(sd, AU_STATUS0) & MASK_S_A_SAMPLE;
Do you know how this register gets set? For some reason if I have a video with no audio it still reports there’s audio present.
from the driver side, it’s only read the register values.
you should dig into the specification for the register programming steps.
These are the registers of the tc358743, correct?
I have the spec sheet for the chip but it doesn’t have register info. I also see the tc358743_regs.c which contains all the register addresses in it. The missing link is how AU_STATUS0 is set/unset. But given if there is no HDMI cable connected the register value is unset (0) then there has to be some data transmitted from the audio/video source. @mmkunzendorf suggested it is the EDID info. I’m thinking that’s probably it but would love to know for sure.
yes, EDID should point out the audio info, it contains the capability info of this monitor/device.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.