Go to advanced search

by HiassofT
Sun Feb 10, 2019 10:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Incorrect bytes received through USB
Replies: 5
Views: 168

Re: Incorrect bytes received through USB

Keep in mind that read() and write() will transfer up to the number of bytes specified in the count argument - see "man 2 read" and "man 2 write" for details.

So always check the return value of these calls, especially in non-blocking mode as typically used with serial devices.

so long,

Hias
by HiassofT
Thu Jan 24, 2019 10:11 pm
Forum: Advanced users
Topic: Analogue audio redux
Replies: 71
Views: 17506

Re: Analogue audio redux

We've had a couple of reports in LibreELEC that playing live TV results in audio crackling when audio_pwm_mode=2. See eg here: https://www.raspberrypi.org/forums/viewtopic.php?f=35&t=231162&p=1415777#p1415724 I haven't checked that myself yet but I'm guessing deinterlacing, DRAM bandwitdh, GPU load ...
by HiassofT
Thu Jan 24, 2019 12:30 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 882
Views: 397687

Re: STICKY: The I2S sound thread.

Why is that left-justified mode more prone to errors than I2S? LRCLK phase problem maybe, PCM DAI cannot detect the first LRCLK edge? It's probably a limitation in the hardware implementation of the I2S block. My guess is the sync logic needs at least one clock cycle between the leading edge of LRC...
by HiassofT
Tue Jan 22, 2019 3:14 pm
Forum: General discussion
Topic: Features for future Pi, voltage/current reporting.
Replies: 49
Views: 1303

Re: Features for future Pi? (suggestion)

jamesh wrote:
Tue Jan 22, 2019 2:01 pm
Unfortunately the ADC's on the particular PMIC we use are non-functional. Apparently, having just spoken to someone who knows.
Ah, what a pity, would have been nice if that could have worked. But thanks a lot for checking into it!

so long,

Hias
by HiassofT
Tue Jan 22, 2019 1:32 pm
Forum: General discussion
Topic: Features for future Pi, voltage/current reporting.
Replies: 49
Views: 1303

Re: Features for future Pi? (suggestion)

The MxL7704 PMIC doesn't report its voltage input, but it does have two unused ADC inputs, one of which could perhaps be used to monitor the voltage input. That might be zero-cost except for the cost of tracking so maybe something to bear in mind for future generations of Pi if they use the same PM...
by HiassofT
Wed Jan 16, 2019 10:03 pm
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 2961

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

There are measures to remove the glue, so a second level of security is needed. If you can remove the glue and swap the SD card then doing it in bootcode.bin is too late. If you prevent people swapping the SD card or get access to the RPi itself then you can just clear RAM during the normal Linux b...
by HiassofT
Mon Jan 14, 2019 7:29 pm
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 2961

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

So effectively, we would need to update the hardcoded bootcode in the SOC to achieve this. (See 6by9's post above about secure boot as well) Which is not possible without very large sums of money expended. Basically yes, but it still is a very incomplete fix so IMO not worth the hassle. If one is c...
by HiassofT
Mon Jan 14, 2019 5:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 882
Views: 397687

Re: STICKY: The I2S sound thread.

The "DAI ... not registered - will retry" messages are harmless, they are caused by deferred probing. The important thing is that you get the "i2s mapping ok" message, this means the driver loaded successfully. I'm not familiar with that codec but I'd recommend checking the alsamixer settings - prob...
by HiassofT
Mon Jan 14, 2019 4:03 pm
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 2961

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

OTOH preserving RAM contents across reboots is very helpful when debugging things (eg using ramoops) as is JTAG because it means you can do post-mortem analysis when a system crashed. Yes, I certainly think ramoops is useful and should be enabled by default too. But that could work together fine wi...
by HiassofT
Mon Jan 14, 2019 2:04 pm
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 2961

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

Yes, wishlist material. Hmm, thinking about it, that may not work either. Given the fact that in the past when you switched RAM vendor you also released a new bootcode.bin, I am guessing RAM is enabled by that file on SD card, and access to it is still disabled when the on-chip bootrom is run. If y...
by HiassofT
Sun Jan 13, 2019 5:44 pm
Forum: Media centres
Topic: DVB TV HAT sound issues
Replies: 2
Views: 454

Re: DVB TV HAT sound issues

Add audio_pwm_mode=0 (you could also try with 1) to your config.txt.

There were several reports that the new, optimized analog audio code in the firmware causes issues with live TV (probably due to deinterlacing) and 1080p50/60 playback.

so long,

Hias
by HiassofT
Sun Jan 13, 2019 3:05 pm
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 2961

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

Has anyone ever tried reading ram after a cold boot or whatever, to see if there is anything in it? Not on the RPi or any semi-modern system / DRAM chip. But it's a very long known fact that DRAM can hold it's contents much longer than expected. The OS ROM of the Atari 8-bit XL/XE computers check f...
by HiassofT
Fri Jan 11, 2019 11:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: AtariSIO (Atari 8-bit peripheral emulator) with RPi support
Replies: 0
Views: 293

AtariSIO (Atari 8-bit peripheral emulator) with RPi support

After 3 months of testing and about 17 years after my initial release for x86 PCs I'm glad to announce that I just released the first version of AtariSIO that officially supports the Raspberry Pi: http://www.horus.com/~hias/atari/#atarisio atariserver, an Atari 8-bit peripheral emulator, now works b...
by HiassofT
Wed Jan 09, 2019 1:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO-IR with old IR-Receiver from Haupauge-PCI-Card
Replies: 1
Views: 351

Re: GPIO-IR with old IR-Receiver from Haupauge-PCI-Card

If you have a scope probe the signal pin. It should idle at VCC (3.3V) and go to low when an IR burst is received. With an RC6 (MCE) remote it looks like this: rc6.png Depending on the IR remote (protocol) the length of the bursts (low signal) and idle times (high signal) are multiples of roughly 50...
by HiassofT
Mon Dec 24, 2018 12:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 882
Views: 397687

Re: STICKY: The I2S sound thread.

How did you measure the frequencies? The 48kHz measurement shows a deviation of approx 40ppm which is about to be expected. A 3.072MHz bclk will be derived from the 500MHz PLL by using a fractional divider. Average frequency should be pretty spot on, but you may see a 2ns jitter when using a rather ...
by HiassofT
Wed Dec 19, 2018 12:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 882
Views: 397687

Re: STICKY: The I2S sound thread.

The bcm2835 driver seems to support SND_SOC_DAIFMT_CONT (which should also be controllable via the continuous-clock dai-link property, eg when using simple card) but I have never tested that. SND_SOC_DAIFMT_CONT will keep the clock running during pause, but when you close the audio device it'll be s...
by HiassofT
Mon Dec 10, 2018 9:05 pm
Forum: Advanced users
Topic: Volume Control data over SPI BUS
Replies: 3
Views: 154

Re: Volume Control data over SPI BUS

Look at the kernel docs in Documentation/sound, especially the soc folder. An check the existing drivers in sound/soc/codecs, there a re a lot of examples in there.

so long,

Hias
by HiassofT
Mon Dec 10, 2018 12:56 pm
Forum: Advanced users
Topic: Volume Control data over SPI BUS
Replies: 3
Views: 154

Re: Volume Control data over SPI BUS

If this is in addition to an (I2S) audio card then just create a codec driver that exposes a volume control mixer and add that as an auxiliary device in the card driver (aux_dev list in snd_soc_card or aux-devs DT property in the simple audio card driver). See for example the various amplifier drive...
by HiassofT
Fri Dec 07, 2018 8:55 pm
Forum: General discussion
Topic: Just about to buy Raspberry Pi for Media Centre and would appreciate help
Replies: 30
Views: 1075

Re: Just about to buy Raspberry Pi for Media Centre and would appreciate help

LibreELEC's tagline is "Just enough OS for Kodi". It's a minimal Linux OS with a few essential services and, of course Kodi. You can do most system configuration stuff (like enabling/disabling Samba, configuring network etc) from within Kodi and it's basically plug-and-play. The XBOX DVB-T dongle wo...
by HiassofT
Wed Dec 05, 2018 2:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 882
Views: 397687

Re: STICKY: The I2S sound thread.

Which kernel driver are you using? Codec drivers like spdif_rx support 16bit, 24bit (S24_LE) and 32bit (S32_LE, added to spdif-rx in kernel 4.16) and this is working fine - I've used 24bit recording with the Cirrus Logic audio card. Padding via bclk ratio / tdm slot with is a different thing. If you...
by HiassofT
Mon Dec 03, 2018 11:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PT8211 I2S ASOC driver
Replies: 14
Views: 2442

Re: PT8211 I2S ASOC driver

In your particular case the outcome was that the second dtoverlay somewhat disabled the first one. But this is nothing you can count on, if you have conflicting overlays enabled the result isn't clear - it could also be that none of them will work. So better don't do that. For example the hifiberry-...
by HiassofT
Mon Dec 03, 2018 1:27 pm
Forum: General discussion
Topic: Automatically turn on TV using PIR motion sensor and IR emitter
Replies: 8
Views: 437

Re: Automatically turn on TV using PIR motion sensor and IR emitter

You can rather easily send IR commands with ir-ctl. eg use "ir-ctl -S rc5:0x1234" to send a IR signal using the rc5 protocol with address (manufacturer) 0x12 and command 0x34. BTW: I'd recommend using the latest v4l-utils version (currently 1.16.2), the version shipping with Debian/Raspbian is a bit...
by HiassofT
Mon Dec 03, 2018 10:25 am
Forum: Device Tree
Topic: Enabling the VC4 DRM/KMS driver
Replies: 7
Views: 1958

Re: Enabling the VC4 DRM/KMS driver

FYI: you don't need to patch the kernel tree to get dtb files with symbols, you can simply set DTC_FLAGS when calling make. eg ARCH=arm64 CROSS_COMPILE=... DTC_FLAGS="-@ -H epapr" make This also works on upstream kernels and I've been using that both for RPi and other SBCs for quite some time now. s...
by HiassofT
Mon Dec 03, 2018 10:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PT8211 I2S ASOC driver
Replies: 14
Views: 2442

Re: PT8211 I2S ASOC driver

If you update to kernel 4.19 the spdif transmitter codec will support 32bit as well (this was added in 4.16). On kernel 4.14 you can use the pcm5102a codec that the hifiberry dac driver is using (it's basically a dummy codec as well that's only available in the RPi kernel and was added with the hifi...
by HiassofT
Sun Dec 02, 2018 12:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PT8211 I2S ASOC driver
Replies: 14
Views: 2442

Re: PT8211 I2S ASOC driver

By default bcm2835-i2s sets the number of bclk cycles to the data width - 16 for 16bit samples, 24 for 24bit etc. To use a fixed amount of cycles add the dai-tdm-slot-num (must be 2, as we have 2 channes) and dai-tdm-slot-width (set it to 32 to use 32 cycles per sample) to the cpu endpoint. eg cpu_e...

Go to advanced search