daryl1243
Posts: 1
Joined: Sat Dec 28, 2019 10:51 am

Auvidea B101 audio issues

Sat Dec 28, 2019 10:56 am

Hello everyone,


first off I have to say that im a total noob in this, so yeah.

I recently got the Auvidea B101 for a project im working on, I got it working with gstreamer just fine.
But then I noticed that I don't have any audio, I now know that you have to use the cables to get I2S audio.
I searched the forums and google but either im just plain dumb or I couldn't find it.

Can just someone who has experience in this tell me how to get audio on this thing? I know the cables go in the GPIO header but I just can't figure out where and what steps to take after that.

Thanks a lot in advance.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Wed Jan 29, 2020 9:33 am

Hi, i have the same problem...

In my case, i use the B101 HDMI to CSI-2 bridge (rev 4 with I2S audio, connected with 15 pin FFC cable).

We can check the old posts on this forum and try to up again this subject to establish a updated and correct way.

Anyone can help us? Thank's

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Wed Jan 29, 2020 12:57 pm

https://www.raspberrypi.org/forums/view ... 8#p1339178

Note this is not compatible with using the firmware drivers through raspivid, nor UV4L. Please ensure you use the "dtoverlay=tc358743" entry to load the V4L2 driver for the board.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Thu Jan 30, 2020 10:51 am

Thank's 6by9,

I have video perfectly but i haven't audio... Do i need only connect the pins 5,6 and 7 ?? what happend with the others pins?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Thu Jan 30, 2020 11:14 am

onlypalmero wrote:
Thu Jan 30, 2020 10:51 am
I have video perfectly but i haven't audio... Do i need only connect the pins 5,6 and 7 ?? what happend with the others pins?
If you have video via any other route than the tc358743 kernel drivers, then forget about audio.

Read the manual - https://auvidea.eu/download/manual/B10x ... ce_1.4.pdf
Personally I connect up pin 8 (GND) to a ground on the 40pin header too, but not technically necessary as it is grounded through the flexi cable.

It doesn't help that the names Auvidea have used don't match those used on the chip datasheet. That lists A_SCK, A_WFS, A_SD, and A_OSCK.
A_OSCK is the audio oversampling clock (256 * fs) and is not needed for I2S. Presumably that is the pin Auvidea have called A-MCLK.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Thu Jan 30, 2020 11:38 am

You are very fast haha

Sorry, i'm new so i can explain some details for my setup...

I have the chip B101 HDMI to CSI-2 bridge (rev 4 with I2S audio). It has connected to my Raspberry Pi 3B rev 1.2 as the bellow image;

Image

I using the last release os Raspbian (Buster) and follow your steps https://www.raspberrypi.org/forums/view ... d#p1324281

Previusly, i enabled the camera and i2c with "sudo rpi-config".

Finally, i'm trying capture using your "yavta" modded version. https://github.com/6by9/yavta

The video has been recorded perfectly but audio doesn't work.

When i put the command "v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums" i get the final message "VIDIOC_S_EDID: failed: Inappropriate ioctl for device",

So, when i put the command "v4l2-ctl --list-ctrls" i can't see "audio_sampling_frequency and audio_present". With the command "alsamixer" i can see "tc358743" but it say that no havent controllers.

Have you some idea about what happened?

Very thank's for your time.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Thu Jan 30, 2020 11:58 am

Your wiring look right, although I can't tell for certain where the orange wire is going. It should be GPIO 12 (6 from the left on the top row in your photo).
I could make comment about you using a black wire for the 3.3V supply on that connector :shock:
onlypalmero wrote:
Thu Jan 30, 2020 11:38 am
When i put the command "v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums" i get the final message "VIDIOC_S_EDID: failed: Inappropriate ioctl for device",
Fix that first. Have you got a file 1080P50EDID.txt in the current directory?
onlypalmero wrote:So, when i put the command "v4l2-ctl --list-ctrls" i can't see "audio_sampling_frequency and audio_present". With the command "alsamixer" i can see "tc358743" but it say that no havent controllers.
There are no controls. The chip receives the audio over the HDMI link, forwards it over I2S at that same sampling rate, and the Pi writes it to memory.
Check via v4l2-ctl whether audio_present is 1, and then you have to capture at the sampling rate reported by audio_sampling_frequency.

yavta will never capture audio at the same time as it is only using V4L2 (not ALSA). You need to look at GStreamer or similar in order to capture synchronised audio and video.

https://www.raspberrypi.org/forums/view ... 6#p1394316

Code: Select all

v4l2-ctl --set-dv-bt-timings query
gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! faac ! aacparse ! mux.
You should be able to swap omxh264enc for v4l2h264enc now for a slightly more efficient encode.
And note that you need to manually set the video frame rate and audio sample rate in that gst-launch line.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Fri Jan 31, 2020 12:58 pm

Hi, just now i haven't got video and haven't got audio :lol:

I started the process again with formatted SD and putted the 3.3v connector on the bellow first left pin (from my photo).

After enable camera and i2c, edit "cmdline.txt" and "config.txt". I installed "bc" with apt and follow your steps with "sudo" for install and run v4l2 with edid text file... The result was no get again the error "VIDIOC_S_EDID: failed: Inappropriate ioctl for device". Solved this ;)

So, now i can get list controls with v4l2. I can see "audio_sampling_rate" and "audio_present" as bellow:

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --list-ctrls

User Controls

            audio_sampling_rate 0x00981980 (int)    : min=0 max=768000 step=1 default=0 value=0 flags=read-only
                  audio_present 0x00981981 (bool)   : default=0 value=0 flags=read-only

Digital Video Controls

                  power_present 0x00a00964 (bitmask): max=0x00000001 default=0x00000000 value=0x00000001 flags=read-only

Appear that not detect the audio, per example if i capture a wav file i get the error

Code: Select all

arecord: pcm_read:2145: read error: Error of input/output
Last edited by onlypalmero on Mon Feb 03, 2020 12:55 pm, edited 2 times in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Fri Jan 31, 2020 1:17 pm

onlypalmero wrote:
Fri Jan 31, 2020 12:58 pm

Code: Select all

            audio_sampling_rate 0x00981980 (int)    : min=0 max=768000 step=1 default=0 value=0 flags=read-only
                  audio_present 0x00981981 (bool)   : default=0 value=0 flags=read-only
So your HDMI source isn't producing any audio.What is your source? Until that audio_present control reports that audio is detected then you won't get anything.

You can also use "v4l2-ctl --log-status" to provide a slightly more comprehensive debug log of what the chip is doing.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Mon Feb 03, 2020 1:17 pm

Sorry for edits... i'm try to made comments more cleaned.

After the some test, i can say two things. I lose all changes when reboot my PI and... i have audio and video separately.

For this, i need add to my "/boot/config.txt" the next;

Code: Select all

dtparam=i2s=on
dtparam=i2c_vc=on
dtoverlay=tc358743
dtoverlay=tc358743-fast
dtoverlay=tc358743-audio
dtparam=audio=on

I need run the next commands on every reboot.

Code: Select all

sudo modprobe bcm2835-v4l2
v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
v4l2-ctl --set-dv-bt-timings query

once runned, i can see the audio controller with "v4l2-ctl --list-ctrls"

Code: Select all

User Controls

            audio_sampling_rate 0x00981980 (int)    : min=0 max=768000 step=1 default=0 value=44100 flags=read-only
                  audio_present 0x00981981 (bool)   : default=0 value=1 flags=read-only

Digital Video Controls

                  power_present 0x00a00964 (bitmask): max=0x00000001 default=0x00000000 value=0x00000001 flags=read-only

So, with "arecord -l" i can see this;

Code: Select all

**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And finally i can check audio and video separately on VLC with the next commands;

Audio::

Code: Select all

arecord -D hw:1,0 -d 25 -f dat | vlc stream:///dev/stdin
Video::

Code: Select all

./yavta --capture=1000 -n 3 --encode-to=- -f UYVY -m -T /dev/video0 | vlc stream:///dev/stdin :demux=h264

So, i need how to join both with gst-launch-1.0 and ffmpeg... little by little

Note :: the audio captured have sharp noise ( i don't know how i say "ruido agudo" from spanish to english, it look like smurfs talking)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Mon Feb 03, 2020 1:28 pm

onlypalmero wrote:
Mon Feb 03, 2020 1:17 pm
Sorry for edits... i'm try to made comments more cleaned.

After the some test, i can say two things. I lose all changes when reboot my PI and... i have audio and video separately.

For this, i need add to my "/boot/config.txt" the next;

Code: Select all

dtparam=i2s=on
dtparam=i2c_vc=on
dtoverlay=tc358743
dtoverlay=tc358743-fast
dtoverlay=tc358743-audio
dtparam=audio=on
dtparam=i2s=on is included in tc358743-audio
dtparam=i2c_vc=on is included in tc358743
tc358743-fast no longer exists.
audio=on is enabling the Pi audio output device - that's independent of any capture.

Code: Select all

dtoverlay=tc358743
dtoverlay=tc358743-audio
dtparam=audio=on
is all you need.
onlypalmero wrote:I need run the next commands on every reboot.

Code: Select all

sudo modprobe bcm2835-v4l2
v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
v4l2-ctl --set-dv-bt-timings query
sudo modprobe bcm2835-v4l2 is wrong. It's trying to load that camera V4L2 driver.
Yes you need the other two commands. The latter is needed every time the source changes resolution/framerate.
onlypalmero wrote:once runned, i can see the audio controller with "v4l2-ctl --list-ctrls"

Code: Select all

User Controls

            audio_sampling_rate 0x00981980 (int)    : min=0 max=768000 step=1 default=0 value=44100 flags=read-only
                  audio_present 0x00981981 (bool)   : default=0 value=1 flags=read-only

Digital Video Controls

                  power_present 0x00a00964 (bitmask): max=0x00000001 default=0x00000000 value=0x00000001 flags=read-only

So, with "arecord -l" i can see this;

Code: Select all

**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
And finally i can check audio and video separately on VLC with the next commands;

Audio::

Code: Select all

arecord -D hw:1,0 -d 25 -f dat | vlc stream:///dev/stdin
Video::

Code: Select all

./yavta --capture=1000 -n 3 --encode-to=- -f UYVY -m -T /dev/video0 | vlc stream:///dev/stdin :demux=h264
So, i need how to join both with gst-launch-1.0 and ffmpeg... little by little

Note :: the audio captured have sharp noise ( i don't know how i say "ruido agudo" from spanish to english, it look like smurfs talking)
Note that

Code: Select all

            audio_sampling_rate 0x00981980 (int)    : min=0 max=768000 step=1 default=0 value=44100 flags=read-only
44.1kHz is the CD sampling rate. DAT is at 48kHz. You MUST follow the sampling rate that the capture device has reported it as, otherwise you'll get audio underruns, and it'll shift the pitch up when you play it back at 48kHz.

Code: Select all

arecord -D hw:1,0 -d 25 -f cd
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Tue Feb 04, 2020 8:24 am

Ohh thank's for clarify 6by9. Now the sound is perfect :D

One thing i checked is the command "v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums" doesn't work if not enable "dtparam=i2c_vc=on" on "/boot/config.txt". Everything else is fine.

Very thank's for your support. Good job!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Tue Feb 04, 2020 10:52 am

onlypalmero wrote:
Tue Feb 04, 2020 8:24 am
One thing i checked is the command "v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums" doesn't work if not enable "dtparam=i2c_vc=on" on "/boot/config.txt". Everything else is fine.
Odd. I've just tested on my Pi4 and it works fine. They both set the status at https://github.com/raspberrypi/linux/bl ... .dtsi#L420 to enabled. (I am testing on a 5.4 kernel, but the same should still apply).
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Rondai
Posts: 2
Joined: Wed Sep 23, 2020 7:12 am

Re: Auvidea B101 audio issues

Wed Sep 23, 2020 7:41 am

Thank you always for useful information.
The basic setting is based on what you told me.
I can see how the video works.
Sound cannot be recorded.

Please let me know if there is any way to check and respond.
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 [bcm2835-i2s-dir-hifi dir-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
v4l2-ctl --list-ctrls
User Controls
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
Digital Video Controls
power_present 0x00a00964 (bitmask): max=0x00000001 default=0x00000000 value=0x00000001 flags=read-only
The following would exit without error and generate the file.
There is no sound and the volume gauge does not rise.
It has an HDMI output, and you can hear the sound when you connect it to the monitor.
arecord -Vmono -D hw:1,0 -d 10 -f dat test1.wav
Please help me. Thank you in advance.

◆My System Info
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
uname -a
Linux iZCast-Pi3B-No2 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
cat /proc/cpuinfo | grep Revision
Revision : a32082

onlypalmero
Posts: 19
Joined: Wed Jan 29, 2020 9:24 am

Re: Auvidea B101 audio issues

Wed Sep 23, 2020 3:55 pm

Hi Rondai,

Are you connected the pins directly from dongle B101 to PI? If not, tell me for search a photo to send you.

Also you can follow the next topic for record audio => viewtopic.php?f=44&t=263969

Regards

Rondai
Posts: 2
Joined: Wed Sep 23, 2020 7:12 am

Re: Auvidea B101 audio issues

Mon Sep 28, 2020 10:43 pm

onlypalmero wrote:
Wed Sep 23, 2020 3:55 pm
Hi Rondai,

Are you connected the pins directly from dongle B101 to PI? If not, tell me for search a photo to send you.

Also you can follow the next topic for record audio => viewtopic.php?f=44&t=263969

Regards
Thank you for your reply!
There seems to be no problem with the PIN connection.
I'll check you send LINK Page.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13265
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Auvidea B101 audio issues

Tue Sep 29, 2020 1:32 pm

See viewtopic.php?f=38&t=281972 for my install instructions for the TC358743 with audio.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Interfacing (DSI, CSI, I2C, etc.)”