panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

HDMI to CSI-2 TC358743 I2S Audio

Sat Dec 07, 2019 5:08 pm

Hello,

I'm using a raspberry pi 4 and hdmi to csi-2 boards with i2s sound.

Installed the uv4l using the installation guide here: https://www.linux-projects.org/uv4l/installation/
Managed to capture video using dd & ffmpeg
I also want to get the audio of the hdmi so I read this post viewtopic.php?f=38&t=120702&start=450&s ... 0470a66052 but after several days of trials I didn't manage to do it.

Using the forum I did this

Code: Select all

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

Code: Select all

pi@raspberrypi:~ $ 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

Code: Select all

pi@raspberrypi:~ $ sudo arecord -D hw:1,0 -d 25 -f dat test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2145: read error: Input/output error
I don't know what else to do to get audio input to work.
Thanks in advance!

wolf.z
Posts: 131
Joined: Thu Dec 24, 2015 8:34 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Sat Dec 07, 2019 6:39 pm

Did you take notice you have to configure an i2s Audio interface, both hardware and software wise? The CSI port is video only. The Audio comes with an extra connector on the HDMI CSI board. To be connected to the 40 Pin GPIO header.

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Sat Dec 07, 2019 9:32 pm

dtoverlay=tc358743-audio requires dtoverlay=tc358743 to be loaded too. It can't be used independently as the tc358743 has to be configured appropriately.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 3:53 pm

I had added this and the command I used for capturing video stopped working

Code: Select all

dtparam=i2s=on
dtparam=i2c_vc=on
dtoverlay=tc358743
dtoverlay=tc358743-audio
If I remove the dtoverlay=tc358743 this command works

Code: Select all

 dd if=/dev/video0 bs=1M of=/home/pi/out.h264

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 4:49 pm

UV4L and the kernel driver are mutually incompatible. Choose which you wish to use.

- UV4L "black boxes" stuff so that you get a pre-encoded H264 stream, but audio won't work. It's closed source so you're reliant on RpiName who sometimes pops up on here to assist with UV4L.
- The kernel driver has working audio, but you need to make up your own pipeline to H264 encode the output. There are various threads already that describe how to set things up, and I know I've had synchronised audio and video encoded through GStreamer.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

RpiName
Posts: 714
Joined: Sat Jul 06, 2013 3:14 am

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 5:32 pm

6by9 wrote:
Mon Dec 09, 2019 4:49 pm
- UV4L "black boxes" stuff so that you get a pre-encoded H264 stream, but audio won't work. It's closed source so you're reliant on RpiName who sometimes pops up on here to assist with UV4L.
if the audio device is exposed as an alsa/pulseaudio interface by the kernel/os, then it should be possible to configure uv4l to capture audio from the device and stream it through webrtc (with or without h264-encoded video).

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 6:19 pm

RpiName wrote:
Mon Dec 09, 2019 5:32 pm
if the audio device is exposed as an alsa/pulseaudio interface by the kernel/os, then it should be possible to configure uv4l to capture audio from the device and stream it through webrtc (with or without h264-encoded video).
You need to have poked the correct registers in the TC358743 to configure I2S audio, and you also need to be querying the audio status and sampling frequency. That's why the kernel V4L2 driver has read-only properties of "Audio present" and "Audio sampling rate". If there is no audio on the HDMI into the TC358743, then you get no I2S clocks, and you can expect buffer underflows/timeouts.

Whilst the dtoverlay=tc358743-audio line may end up setting things correctly for you, it'll depend on your I2C commands, and the EDID you download, as to whether audio will ever work. Sorry, it's not a use case I'm prepared to expend time on.
From my perspective using the kernel drivers with something like GStreamer to efficiently pipe them into v4l2h264enc or similar is the correct solution.
See https://www.raspberrypi.org/forums/view ... 6#p1394316 for a GStreamer pipeline that should record synchronised audio and video.
https://www.raspberrypi.org/forums/view ... 6#p1447610 is reporting a slightly different pipeline as he wanted to stream to Twitch.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 9:41 pm

I just tried to install gstreamer to try your command, but I don't know how to install the OpenMax plugin you linked


https://github.com/6by9/gst-omx/tree/pi

Please guide me
Thank you!

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Mon Dec 09, 2019 11:39 pm

After a lot of searching I managed to do something but stacked here. How I will update gstreamer?

Code: Select all

pi@raspberrypi:~/gst-omx $ ./configure --prefix=/home/pi/omx
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking target system type... armv7l-unknown-linux-gnueabihf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking nano version... 1
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for VALGRIND... no
configure: Using GStreamer OpenMAX Plug-ins git as package name
configure: Using Unknown package origin as package origin
configure: Using GST_PKG_CONFIG_PATH = $(top_builddir)/pkgconfig

configure: *** checking feature: building of experimental plug-ins ***
configure: not building experimental plug-ins
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking for valgrind... no
checking for gtkdoc-check... /usr/bin/gtkdoc-check
checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... no
configure: Looking for Python version >= 2.1
checking for python... /usr/bin/python
checking "/usr/bin/python":... okay
checking local Python configuration... looks good
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking whether to build plugin documentation... no (gtk-doc disabled or not available)
checking for cos in -lm... yes
checking for ANSI C header files... (cached) yes
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in _stdint.h (assuming C99 compatible system)
checking whether gcc implements __PRETTY_FUNCTION__... yes
checking whether gcc implements __FUNCTION__... yes
checking whether gcc implements __func__... yes
checking for GLIB... yes
checking for glib-genmarshal... /usr/bin/glib-genmarshal (from pkg-config path)
checking for glib-mkenums... /usr/bin/glib-mkenums
checking for GIO... yes
checking for GMODULE_NO_EXPORT... yes
checking for GST... no
configure: Requested 'gstreamer-1.0 >= 1.15.0.1' but version of GStreamer is 1.14.4
configure: error: no gstreamer-1.0 >= 1.15.0.1 (GStreamer) found

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 7:28 am

IIRC The Raspbian GStreamer package includes my patches now.
That post was written a while ago. I'd suggest you use v4l2h264enc instead of omxh264enc now.

If you want to rebuild GStreamer then you need to build for the same version that is installed, or rebuild and install everything.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 11:02 am

Thank you for your replies!
When I manage to get this to work I will write a tutorial that is missing for this board!
But I have still not managed to run the pipeline.
As you can see below I installed all the plugins but the faac is missing. If I remove it from the pipeline then I get that I could not link queue1 to aacparse0 and by removing this I just get video

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install gstreamer1.0-plugins-*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gstreamer1.0-plugins-ugly-amr' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-ugly-dbg' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-ugly-doc' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-base-apps' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-good' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-base' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad-videoparsers' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-really-bad' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad-dbg' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad-doc' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad-faad' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-rtp' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-base-dbg' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-good-dbg' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-base-doc' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-good-doc' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-ugly' for glob 'gstreamer1.0-plugins-*'
Note, selecting 'gstreamer1.0-plugins-bad' instead of 'gstreamer1.0-plugins-bad-faad'
Note, selecting 'gstreamer1.0-plugins-bad' instead of 'gstreamer1.0-plugins-bad-videoparsers'
Note, selecting 'gstreamer1.0-plugins-ugly' instead of 'gstreamer1.0-plugins-ugly-amr'
gstreamer1.0-plugins-bad is already the newest version (1.14.4-1+b1).
gstreamer1.0-plugins-bad-dbg is already the newest version (1.14.4-1+b1).
gstreamer1.0-plugins-bad-doc is already the newest version (1.14.4-1).
gstreamer1.0-plugins-base is already the newest version (1.14.4-2).
gstreamer1.0-plugins-base-apps is already the newest version (1.14.4-2).
gstreamer1.0-plugins-base-dbg is already the newest version (1.14.4-2).
gstreamer1.0-plugins-base-doc is already the newest version (1.14.4-2).
gstreamer1.0-plugins-rtp is already the newest version (1.14.4.1).
gstreamer1.0-plugins-ugly is already the newest version (1.14.4-1).
gstreamer1.0-plugins-ugly-dbg is already the newest version (1.14.4-1).
gstreamer1.0-plugins-ugly-doc is already the newest version (1.14.4-1).
gstreamer1.0-plugins-good is already the newest version (1.14.4-1+rpt1).
gstreamer1.0-plugins-good-dbg is already the newest version (1.14.4-1+rpt1).
gstreamer1.0-plugins-good-doc is already the newest version (1.14.4-1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
pi@raspberrypi:~ $ gst-inspect|grep aac
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! faac ! aacparse ! mux.
WARNING: erroneous pipeline: no element "faac"
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! aacparse ! mux.
WARNING: erroneous pipeline: could not link queue1 to aacparse0

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 11:08 am

Also when I try to install everything from gstreamer-* then I get this

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install gstreamer1.0-*
.....
The following packages have unmet dependencies:
 gstreamer1.0-omx-dbg : Depends: gstreamer1.0-omx (= 1.0.0.1-0+rpi12+jessiepmg) but 1.14.4-1+rpt1 is to be installed
 gstreamer1.0-python3-dbg-plugin-loader : Conflicts: gstreamer1.0-python3-plugin-loader but 1.14.4-1 is to be installed
 gstreamer1.0-python3-plugin-loader : Conflicts: gstreamer1.0-python3-dbg-plugin-loader but 1.14.4-1 is to be installed
E: Unable to correct problems, you have held broken packages.

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 11:36 am

panayiotis95 wrote:
Tue Dec 10, 2019 11:08 am
Also when I try to install everything from gstreamer-* then I get this

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install gstreamer1.0-*
.....
The following packages have unmet dependencies:
 gstreamer1.0-omx-dbg : Depends: gstreamer1.0-omx (= 1.0.0.1-0+rpi12+jessiepmg) but 1.14.4-1+rpt1 is to be installed
 gstreamer1.0-python3-dbg-plugin-loader : Conflicts: gstreamer1.0-python3-plugin-loader but 1.14.4-1 is to be installed
 gstreamer1.0-python3-plugin-loader : Conflicts: gstreamer1.0-python3-dbg-plugin-loader but 1.14.4-1 is to be installed
E: Unable to correct problems, you have held broken packages.
You don't need gstreamer1.0-omx - use v4l2h264enc instead.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 12:05 pm

I made a clean install of raspbian and set everything as before to enable tc358743.
I update-upgrade and then run this command to install the gstreamer

Code: Select all

sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio
But when I tried to run this I got faac error

Code: Select all

pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! faac ! aacparse ! mux.
WARNING: erroneous pipeline: no element "faac"


from the gstreamer documentation found that faac is in gstreamer1.0-plugins-bad but it does not installed do you know why?
Or something else to suggest to get this to work?

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 1:52 pm

On my Buster system:

Code: Select all

pi@raspberrypi:~/yavta $ gst-inspect-1.0 | grep aac
libav:  avenc_aac: libav AAC (Advanced Audio Coding) encoder
libav:  avdec_aac: libav AAC (Advanced Audio Coding) decoder
libav:  avdec_aac_fixed: libav AAC (Advanced Audio Coding) decoder
libav:  avdec_aac_latm: libav AAC LATM (Advanced Audio Coding LATM syntax) decoder
libav:  avmux_adts: libav ADTS AAC (Advanced Audio Coding) muxer (not recommended, use aacparse instead)
audioparsers:  aacparse: AAC audio stream parser
typefindfunctions: audio/aac: aac, adts, adif, loas
voaacenc:  voaacenc: AAC audio encoder
so avenc_aac or voaacenc would appear to be your candidates for encoders.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 3:01 pm

Using voaacenc I managed to run the command and store the video. But still no audio.
I connected the cables like this:
BCK/SCK to GPIO 18
LRCK/WFS to GPIO 19
DATA/SD to GPIO 20

This is what I run after a reboot but the video stored without audio

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

CTA-861 Header
  IT Formats Underscanned: yes
  Audio:                   yes
  YCbCr 4:4:4:             no
  YCbCr 4:2:2:             no

HDMI Vendor-Specific Data Block
  Physical Address:        3.0.0.0
  YCbCr 4:4:4 Deep Color:  no
  30-bit:                  no
  36-bit:                  no
  48-bit:                  no

CTA-861 Video Capability Descriptor
  RGB Quantization Range:  yes
  YCC Quantization Range:  no
  PT:                      Supports both over- and underscan
  IT:                      Supports both over- and underscan
  CE:                      Supports both over- and underscan
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 0
	Horizontal sync: 370
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 30
	Vertical backporch: 0
	Standards: 
	Flags: 
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: 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
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:0,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse ! mux.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)640, height=(int)480, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)640, height=(int)480, interlace-mode=(string)progressive
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
Redistribute latency...
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)640, height=(int)480, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)640, height=(int)480, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4907e094318e01a217e95a2019844c613f12ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b65476cd982001654ae6b01000000000000d1ae010000000000007ad7810183810173c588dea29141838ba1fa23e38383fe502a536e86566964656f00e00100000000000008b0820280ba8201e08690565f4d504547342f49534f2f4156430063a2b301640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0ae0100000000000045d7810283810273c588810195362c12df1323e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4907e094318e01a217e95a2019844c613f12ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b65476cd982001654ae6b01000000000000d1ae010000000000007ad7810183810173c588dea29141838ba1fa23e38383fe502a536e86566964656f00e00100000000000008b0820280ba8201e08690565f4d504547342f49534f2f4156430063a2b301640028ffe1002327640028ac2b40501ed080000003008000003c7250001312c0002faf37bdc03c489a8001000528ee025cb0ae0100000000000045d7810283810273c588810195362c12df1323e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:04.369255092
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
pi@raspberrypi:~ $ 

I really don't know what else to do
Appreciate all of your help.

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 5:00 pm

"v4l2-ctl --list-ctrls"
What do audio_present and audio_sampling_rate report?

You also haven't apparently run " v4l2-ctl --set-dv-bt-timings query" to set the resolution to that of the incoming video.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 5:15 pm

Thank you very much for your replies!
You are right I forgot to set the resolution.

Now see what I did after a reboot

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

CTA-861 Header
  IT Formats Underscanned: yes
  Audio:                   yes
  YCbCr 4:4:4:             no
  YCbCr 4:2:2:             no

HDMI Vendor-Specific Data Block
  Physical Address:        3.0.0.0
  YCbCr 4:4:4 Deep Color:  no
  30-bit:                  no
  36-bit:                  no
  48-bit:                  no

CTA-861 Video Capability Descriptor
  RGB Quantization Range:  yes
  YCC Quantization Range:  no
  PT:                      Supports both over- and underscan
  IT:                      Supports both over- and underscan
  CE:                      Supports both over- and underscan
pi@raspberrypi:~ $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 0
	Horizontal sync: 370
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 30
	Vertical backporch: 0
	Standards: 
	Flags: 
pi@raspberrypi:~ $ 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
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse ! mux.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)1280, height=(int)720, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)1280, height=(int)720, interlace-mode=(string)progressive
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
Redistribute latency...
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)1280, height=(int)720, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, colorimetry=(string)bt601, width=(int)1280, height=(int)720, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4902204e84ddeaa46b046318e75247257c62ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b6c6c13bace001654ae6b01000000000000d2ae010000000000007bd7810183810173c588e911977ee9ccfb4323e38383fe502a536e86566964656f00e00100000000000008b0820500ba8202d08690565f4d504547342f49534f2f4156430063a2b401640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0ae0100000000000045d7810283810273c588b7b7fffd6baf68c523e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4902204e84ddeaa46b046318e75247257c62ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b6c6c13bace001654ae6b01000000000000d2ae010000000000007bd7810183810173c588e911977ee9ccfb4323e38383fe502a536e86566964656f00e00100000000000008b0820500ba8202d08690565f4d504547342f49534f2f4156430063a2b401640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0ae0100000000000045d7810283810273c588b7b7fffd6baf68c523e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:44.349246465
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
But the sound still not working
Is there any other thing that I forget to set in order to get sound working?

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 5:59 pm

Reduce your pipeline down to just the audio

Code: Select all

gst-launch-1.0 -vvv -e alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse !  matroskamux name=mux ! filesink location=foo.mkv
or try using arecord to record just the audio.

Check with "arecord -l" that hw:1,0 is the correct alsa name on your system.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 6:13 pm

I tried both of what you said but I no sound. The time bar shows that is a 5s file but I can't hear anything. It seems like a normal audio file that the palys but no sound.

here is what I did

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

CTA-861 Header
  IT Formats Underscanned: yes
  Audio:                   yes
  YCbCr 4:4:4:             no
  YCbCr 4:2:2:             no

HDMI Vendor-Specific Data Block
  Physical Address:        3.0.0.0
  YCbCr 4:4:4 Deep Color:  no
  30-bit:                  no
  36-bit:                  no
  48-bit:                  no

CTA-861 Video Capability Descriptor
  RGB Quantization Range:  yes
  YCC Quantization Range:  no
  PT:                      Supports both over- and underscan
  IT:                      Supports both over- and underscan
  CE:                      Supports both over- and underscan
pi@raspberrypi:~ $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~ $ 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
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse !  matroskamux name=mux ! filesink location=foo.mkv
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = audio/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = audio/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a490f72188262df333021408cf9f27da10cf2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b6f894a088e001654ae6b010000000000004eae0100000000000045d7810183810273c588f1f7d8846562ee0923e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a490f72188262df333021408cf9f27da10cf2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084b6f894a088e001654ae6b010000000000004eae0100000000000045d7810183810273c588f1f7d8846562ee0923e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:39.068063198
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
pi@raspberrypi:~ $ arecord -vv -d 20 -r 48000  -c 2 -f dat -t wav -D sysdefault:CARD=tc358743 out.wav
Recording WAVE 'out.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Plug PCM: Hardware PCM card 1 'tc358743' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 1572864000
  appl_ptr     : 0
  hw_ptr       : 0
#+                                                 | 00%^C
Aborted by signal Interrupt...
#+                                                 | 00%pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ 

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 6:35 pm

Check the wiring for the data line.
No BCK/SCK or LRCK/WFS would probably give you sync errors, whilst no data line would give silence as it doesn't require any transitions.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Tue Dec 10, 2019 7:06 pm

I change the cable of the data line, tried again but nothing. Just to be sure, the data cable goes to GPIO20 which is the physical pin 38 right?

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Wed Dec 11, 2019 12:12 pm

Is there something to try in order to be sure what the problem is?

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

Re: HDMI to CSI-2 TC358743 I2S Audio

Wed Dec 11, 2019 1:06 pm

I've just tested it for myself on a Pi4 with B101 board.

Edited config.txt to add

Code: Select all

dtoverlay=tc358743
dtoverlay=tc358743-audio
Rebooted.

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

CTA-861 Header
  IT Formats Underscanned: yes
  Audio:                   yes
  YCbCr 4:4:4:             no
  YCbCr 4:2:2:             no

HDMI Vendor-Specific Data Block
  Physical Address:        3.0.0.0
  YCbCr 4:4:4 Deep Color:  no
  30-bit:                  no
  36-bit:                  no
  48-bit:                  no

CTA-861 Video Capability Descriptor
  RGB Quantization Range:  yes
  YCC Quantization Range:  no
  PT:                      Supports both over- and underscan
  IT:                      Supports both over- and underscan
  CE:                      Supports both over- and underscan
Connect and boot a Pi to the B101. Start it playing a video using omxplayer

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=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
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e alsasrc device=hw:0,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse !  matroskamux name=mux ! filesink location=foo.mkv
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = audio/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = audio/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a49014d5aeefa530ea2e5534252cc31f55762ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084bac6b348f30001654ae6b010000000000004eae0100000000000045d7810183810273c58895f48258e0c787ec23e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a49014d5aeefa530ea2e5534252cc31f55762ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084bac6b348f30001654ae6b010000000000004eae0100000000000045d7810183810273c58895f48258e0c787ec23e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:24.282978809
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
and I get a file foo.mkv of the audio from Big Buck Bunny.
I did amend the command line to "alsasrc device=hw:0,0" as I didn't have dtparam=audio=on. Enabling that and using "alsasrc device=hw:1,0" still works.

Source Pi set to 720p60.

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~ $ gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1 ! v4l2h264enc ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! voaacenc ! aacparse ! mux.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190, framed=(boolean)true
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, level=(string)2, base-profile=(string)lc, profile=(string)lc, stream-format=(string)raw, codec_data=(buffer)1190
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
Redistribute latency...
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, framerate=(fraction)60/1, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4901abaf0e6399177d44110391cccc4438d2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084bad0379ff3c001654ae6b01000000000000d2ae010000000000007bd7810183810173c588ac306b5eb3ce0ef023e38383fe502a536e86566964656f00e00100000000000008b0820500ba8202d08690565f4d504547342f49534f2f4156430063a2b401640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0ae0100000000000045d7810283810273c588bcdd40e6d1bc7f3623e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4901abaf0e6399177d44110391cccc4438d2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e34005741994753747265616d6572204d6174726f736b61206d7578657200446188084bad0379ff3c001654ae6b01000000000000d2ae010000000000007bd7810183810173c588ac306b5eb3ce0ef023e38383fe502a536e86566964656f00e00100000000000008b0820500ba8202d08690565f4d504547342f49534f2f4156430063a2b401640028ffe1002427640028ac2b402802dd08000003000800000303c7250001312c0002faf37bdc03c489a801000528ee025cb0ae0100000000000045d7810283810273c588bcdd40e6d1bc7f3623e3838401458555536e86417564696f00e1010000000000000db58840e77000000000009f81028686415f4141430063a2821190 >
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:21.362449935
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
And I get a recording with synchronised audio and video.

Checked with 1080p24, and as long as you correct the frame rate for the video pipe then it also works fine.

Sorry, not much more I can suggest.
Audio connections from the B101 are
- B101 pin 5 to Pi pin 38
- B101 pin 6 to Pi pin 12
- B101 pin 7 to Pi pin 35
- B101 pin 8 (furthest from the HDMI connector on the B101) to Pi pin 39

I am using a development 5.4.2 kernel, but I don't believe any of this has changed since the latest 4.19 branches.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

panayiotis95
Posts: 15
Joined: Fri Jan 11, 2019 4:45 pm

Re: HDMI to CSI-2 TC358743 I2S Audio

Sun Dec 15, 2019 1:04 pm

Thank you very much for your reply. I ordered a new board because I did everything but I got no sound! When I paly the video captured is in fast forward. I had this problem and before with thw dd command but I managed to resolve it by adjusting the framerate. When I try to do the same here nothing changes and I save a video like it is a time-lapse. Do you have any idea why is this? I have all the settings that you listed above and the video is in 1280x720 60fps

Return to “HATs and other add-ons”