Go to advanced search

by PhilE
Mon Dec 11, 2017 9:54 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: [SOLVED] Writing a codec driver

Your captures do appear to fade in - this is particulary obvious on the sine wave. It's worth checking that the fade in isn't in the source file.
by PhilE
Mon Dec 11, 2017 9:25 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

Don't be angry - be happy you have a working device. :D
by PhilE
Mon Dec 11, 2017 9:20 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

Since changing the size of the window dramatically alters the artifacts, and in this case a small window actually gives the best results, I'm tempted to say that the audio is good and that the problem is with the tools and our ability to use them.
by PhilE
Mon Dec 11, 2017 9:06 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

Does that mean we can effectively close this thread? With enough buffering you don't get underrun, and 16-bit captures show that the waveform looks good - remember to use a large window with a frequency plot if you want to avoid spurious odd-looking frequency spikes.
by PhilE
Mon Dec 11, 2017 8:43 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

The reason the clip looks and sounds so strange is that it appears to contain 24-bit samples packed into 32-bit words with no sign extension, and the location of the padding zero makes it look strange when the samples are interpreted as 32-bit values. If you insert a single zero byte at offset 44 in...
by PhilE
Mon Dec 11, 2017 4:02 pm
Forum: Device Tree
Topic: [Custom Kernel] after compilation dtb modules are missing
Replies: 16
Views: 1996

Re: [Custom Kernel] after compilation dtb modules are missing

Yes, I get the same now, having allowed the build to run to completion. It looks like merging two sets of patches - ours again upstream, mptcp against upstream - is problematic. I've tried several different merge orders with no luck, so I suggest you try the following: 1. Take a copy of the working ...
by PhilE
Mon Dec 11, 2017 3:35 pm
Forum: Device Tree
Topic: using mcp23s17 device tree with gpio-leds
Replies: 3
Views: 104

Re: using mcp23s17 device tree with gpio-leds

The overlay looks OK to me - it compiles, but I haven't used it - except for one thing: the "labele" property should say "label".
by PhilE
Mon Dec 11, 2017 11:49 am
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

Reading your answers this seems more like a sampling or analysis (windowing?) problem than a real problem in the datastream.

Can you make a capture available somewhere to download?
by PhilE
Mon Dec 11, 2017 10:24 am
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

This was made on purpose because my usual with the higher buffers didn't throw this exception which is unsatisfying. It's good to eliminate one potential cause of incorrect audio, so we can focus on what we're left with. I have very limited DSP knowledge, but repeatable, systematic variations in fr...
by PhilE
Sun Dec 10, 2017 10:17 pm
Forum: C/C++
Topic: [SOLVED] Writing a codec driver
Replies: 33
Views: 1093

Re: Writing a codec driver

In this case the "exception" is a warning detected within an interrupt (rather than a fault exception), triggered by an underrun or overrun (XRUN) within ALSA.
by PhilE
Sat Dec 09, 2017 10:23 pm
Forum: Device Tree
Topic: Adding Device Tree to EEPROM config file.
Replies: 27
Views: 1019

Re: Adding Device Tree to EEPROM config file.

The overlay is added to the kernel now, and will be in all future firmware releases.
by PhilE
Sat Dec 09, 2017 8:56 pm
Forum: Device Tree
Topic: RPI CM3 / GPIO27 as output - doesn't boot anymore
Replies: 6
Views: 150

Re: RPI CM3 / GPIO27 as output - doesn't boot anymore

Yes, you could use dt-blob.bin to set a GPIO as an output, but then the question is how are you going to use it after that? GPIO27 pulls low from boot, so it will stay low until something switches it to an output and drives it high, and that should be a clean LOW-to-HIGH transition. dt-blob.bin is a...
by PhilE
Sat Dec 09, 2017 5:34 pm
Forum: Device Tree
Topic: Adding Device Tree to EEPROM config file.
Replies: 27
Views: 1019

Re: Adding Device Tree to EEPROM config file.

Thanks - I'm looking at it now. I can write the Makefile entry so it compiles with the kernel, but I could do with some text for the README.
Are you happy with:

Code: Select all

Name:   applepi-dac
Info:   Configures the ApplePi-DAC audio card
Load:   dtoverlay=applepi-dac
Params: <None>
?
by PhilE
Sat Dec 09, 2017 5:16 pm
Forum: Device Tree
Topic: [Custom Kernel] after compilation dtb modules are missing
Replies: 16
Views: 1996

Re: [Custom Kernel] after compilation dtb modules are missing

I've found the problem, and I also understand why I couldn't reproduce it the last time I tried. The issue is caused by the use of the "--depth 1" option. This tells git to effectively squash all of its history down to a single commit, and is great for saving download time and disk space. However, i...
by PhilE
Sat Dec 09, 2017 11:14 am
Forum: Device Tree
Topic: [Custom Kernel] after compilation dtb modules are missing
Replies: 16
Views: 1996

Re: [Custom Kernel] after compilation dtb modules are missing

No, forget that. You almost certainly have exactly the same problem as the previous poster, with the same solution - don't use "git merge -X theirs".
by PhilE
Sat Dec 09, 2017 10:58 am
Forum: Device Tree
Topic: [Custom Kernel] after compilation dtb modules are missing
Replies: 16
Views: 1996

Re: [Custom Kernel] after compilation dtb modules are missing

Use "make ... savedefconfig" to save a new defconfig, then diff that against bcm2709_defconfig to see what has changed.
by PhilE
Sat Dec 09, 2017 9:30 am
Forum: Device Tree
Topic: RPI CM3 / GPIO27 as output - doesn't boot anymore
Replies: 6
Views: 150

Re: RPI CM3 / GPIO27 as output - doesn't boot anymore

My theory is that your overlay is interfering with the GPIO/pinctrl driver's operation, hence the warnings from multiple seemingly unconnected drivers.

Can you post the whole of the output from dmesg?
by PhilE
Sat Dec 09, 2017 8:56 am
Forum: Device Tree
Topic: RPI CM3 / GPIO27 as output - doesn't boot anymore
Replies: 6
Views: 150

Re: RPI CM3 / GPIO27 as output - doesn't boot anymore

Does changing the GPIO number to something else allow the board to boot?
by PhilE
Fri Dec 08, 2017 9:47 pm
Forum: Device Tree
Topic: using mcp23s17 device tree with gpio-leds
Replies: 3
Views: 104

Re: using mcp23s17 device tree with gpio-leds

There are (at least) two levels of GPIO naming in Linux. Each GPIO controller provides a number of GPIOs, and the kernel can uniquely refer to any of them using a (controller, gpio index) pair. The kernel takes all the GPIOs from all controllers and assembles them into a flat list, giving each a uni...
by PhilE
Fri Dec 08, 2017 8:59 pm
Forum: Device Tree
Topic: Mute GPIO
Replies: 17
Views: 437

Re: Mute GPIO

In order to be useful, the mute pin driver would have to hook into ALSA and be called at appropriate times. ALSA understands three roles (excluding mixers and other exotic features) - the CPU Digital Audio Interface (DAI), the codec and the soundcard that connects the two. The mute pin driver as a s...
by PhilE
Fri Dec 08, 2017 6:27 pm
Forum: Device Tree
Topic: [Custom Kernel] after compilation dtb modules are missing
Replies: 16
Views: 1996

Re: [Custom Kernel] after compilation dtb modules are missing

You need a "mkdir mnt/fat32/overlays" before the copy.
by PhilE
Fri Dec 08, 2017 5:31 pm
Forum: Compute Module
Topic: Compute Module I2C not working (I2Cdetect)
Replies: 18
Views: 772

Re: Compute Module I2C not working (I2Cdetect)

The output is one line per bus: static void print_i2c_busses(void) { struct i2c_adap *adapters; int count; adapters = gather_i2c_busses(); if (adapters == NULL) { fprintf(stderr, "Error: Out of memory!\n"); return; } for (count = 0; adapters[count].name; count++) { printf("i2c-%d\t%-10s\t%-32s\t%s\n...
by PhilE
Fri Dec 08, 2017 5:19 pm
Forum: Compute Module
Topic: Compute Module I2C not working (I2Cdetect)
Replies: 18
Views: 772

Re: Compute Module I2C not working (I2Cdetect)

btw. what are these entries ... I did suspect and tried the first (1)
i2c-1 is the name of the I2C driver instance for I2C bus 1, or have I misunderstood your question?
by PhilE
Fri Dec 08, 2017 5:12 pm
Forum: Compute Module
Topic: Compute Module I2C not working (I2Cdetect)
Replies: 18
Views: 772

Re: Compute Module I2C not working (I2Cdetect)

If that doesn't work, can I see the output from "sudo vcdbg log msg"? If you are sending the output to a file you'll need to send stderr as well:

Code: Select all

$ sudo vcdbg log msg 2>&1 | grep -vi hdmi > vclog.txt
by PhilE
Fri Dec 08, 2017 5:03 pm
Forum: Compute Module
Topic: Compute Module I2C not working (I2Cdetect)
Replies: 18
Views: 772

Re: Compute Module I2C not working (I2Cdetect)

Alternatively use the i2c1-bcm2708 overlay: dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6 This will enable i2c1 AND set the pin functions correctly. pi@raspberrypi:~$ dtoverlay -h i2c1-bcm2708 Name: i2c1-bcm2708 Info: Enable the i2c_bcm2708 driver for the i2c1 bus Usage: dtoverlay=i2c1-b...

Go to advanced search