Trying to build tlv430

Hi,
I have been lurking about these boards asking a few questions about beaglebone. Off and on when I have time I am evaluating the beaglebone for a low latency audio application.

I am using the 4.4.20-ti-r44 build at the moment, in a previous post I have swapped using RPMsg for the older uio_pruss library which was more flexible for my needs. Thanks to a lot of help on the board I managed to get the PRUs loaded and running.

The next thing I want to try is to get the TLV320AIC3204 codec working with the beaglebone black. Looking at the forums there is a lot to do.

  1. Build a kernel module driver, install on target machine under /lib/modules/(kernel name)/kernel/sound.soc.codecs

  2. Look at the dts and disable hdmi support

  3. Then start adding alsa support into the dts for pins, i2c config, links to alsa , etc.

Unfortunately I am stuck at 1 8-(. Being a newbie I am not quie sure what to do.

It looks like there is a driver for it:

KERNEL/sound/soc/codecs/tlv320aic32x4.c

The current kernel has support for snd-soc-tlv320aic31xx.ko, and snd-soc-tlv320aic32032x4.ko. I want to add snd-soc-tlv320aic32x4.ko,

So I cloned the bb kernel. git clone https://github.com/RobertCNelson/bb-kernel , and tried to build ./build_kernel I hoped I could run make menuconfig and enable it but it is not an option.

So some question if anyone can help.

  1. There is no branch for 4.4.20-ti-r44 so I am a bit confused. It might be obvious to guys with experience why but I don;t understand, am I looking at the wrong repository. It looks like this repository is the main one for beaglebone.

  2. So I went for the current release branch at 4.4 just to get started. Started the build and when the menu config came up there was no option to select tlv320aic32032x4. So I looked at the Kconfig , and makefile in the /sound.soc/codecs directory and the file exists, there is an option in the makefile to build if the config is selected. The KConfig looks like it is not selected. I tried to add an option in Kconfig and rebuild using ./build_kernel but it looks like it overwrites my Kconfig when it patches the bbb patch onto 4.4.

  3. Can anyone help, Is there a way just to build the code without calling the patch update ? Also can I add the configuration option into the menu,

I know this is probably basic.

Thanks for any replies,

Paul

Hi,
    I have been lurking about these boards asking a few questions about
beaglebone. Off and on when I have time I am evaluating the beaglebone for a
low latency audio application.

I am using the 4.4.20-ti-r44 build at the moment, in a previous post I have
swapped using RPMsg for the older uio_pruss library which was more flexible
for my needs. Thanks to a lot of help on the board I managed to get the PRUs
loaded and running.

The next thing I want to try is to get the TLV320AIC3204 codec working with
the beaglebone black. Looking at the forums there is a lot to do.

1) Build a kernel module driver, install on target machine under
/lib/modules/(kernel name)/kernel/sound.soc.codecs

2) Look at the dts and disable hdmi support

3) Then start adding alsa support into the dts for pins, i2c config, links
to alsa , etc.

Unfortunately I am stuck at 1 8-(. Being a newbie I am not quie sure what to
do.

It looks like there is a driver for it:

KERNEL/sound/soc/codecs/tlv320aic32x4.c

The current kernel has support for snd-soc-tlv320aic31xx.ko, and
snd-soc-tlv320aic32032x4.ko. I want to add snd-soc-tlv320aic32x4.ko,

So I cloned the bb kernel. git clone
GitHub - RobertCNelson/bb-kernel , and tried to build
./build_kernel I hoped I could run make menuconfig and enable it but it
is not an option.

So some question if anyone can help.

1) There is no branch for 4.4.20-ti-r44 so I am a bit confused. It might be
obvious to guys with experience why but I don;t understand, am I looking at
the wrong repository. It looks like this repository is the main one for
beaglebone.

4.4.20-ti-r44 was generated from:

but don't use it, as "old tags" can't be used in that repo, instead
grab yakbuild and follow the readme/recipe example

2) So I went for the current release branch at 4.4 just to get started.
Started the build and when the menu config came up there was no option to
select tlv320aic32032x4. So I looked at the Kconfig , and makefile in the
/sound.soc/codecs directory and the file exists, there is an option in the
makefile to build if the config is selected. The KConfig looks like it is
not selected. I tried to add an option in Kconfig and rebuild using
./build_kernel but it looks like it overwrites my Kconfig when it patches
the bbb patch onto 4.4.

if you make changes under ./KERNEL/

run:

./tools/rebuild.sh

3) Can anyone help, Is there a way just to build the code without calling
the patch update ? Also can I add the configuration option into the menu,

Regards,

Thanks for the reply Robert. I can build the kernel fine. The trouble is when I try to run the rebuild script under tools I get:

/bin/sh: 0: Can’t open /home/proserv/ti-processor-sdk-linux-am335x-evm-03.00.00.04/linux-devkit/yakbuild/tools/tools/host_det.sh

I checked the ownership of the scripts and files and it is proserv (my user)
drwxrwxrwx 2 proserv proserv 4096 Nov 4 13:17 deploy
-rwxrwxrwx 1 proserv proserv 13600 Nov 4 10:53 host_det.sh
-rwxrwxrwx 1 proserv proserv 9593 Nov 4 10:53 install_kernel.sh
-rwxrwxrwx 1 proserv proserv 4994 Nov 4 10:53 local_install.sh
-rwxrwxrwx 1 proserv proserv 4624 Nov 4 10:53 rebuild_deb.sh
-rwxrwxrwx 1 proserv proserv 7038 Nov 4 14:23 rebuild.sh

probably I am being stupid. Can’t see what else is wrong. Would you have any ideas ?

PS also tried bash and dash as well as sh, same problem.

Not a clue..

So let's go over what the readme says:

git clone https://github.com/RobertCNelson/yakbuild
cd ./yakbuild/

cp recipe.sh.sample recipe.sh

change kernel_tag in the "recipe.sh" to "4.4.20-ti-r44"...

run:

./build_kernel.sh

....

Regards,

Hi,
The kernel build works fine, no problem there, I have the correct images build, rebuild_kernel.sh is ok.

Then I have changed the Kconfig in /KERNEL/soc/codecs/ to add below to give an option to enable the tlv320aic32x4 driver through menu config.

‘config SND_SOC_TLV320AIC32X4
tristate “Texas Instruments TLV320AIC3x4 CODECs”
depends on I2C
select SND_SOC_TLV320AIC32x4’

I want to just rebuild the kernel now without calling git checkout to avoid overwriting my change. Sorry if this basic but it is not clear to me how I can rebuild the kernel without going through the git clone, and checkouts again.

So as suggested I try running /rebuild.sh in the tools directory and it says it can’t open any of the other sh files in the directory. I tried dash and bash, I’ve checked the files are executable and all appears ok.

Cheers,
Paul

Oops sorry I mean build_kernel.sh worked fine.

run as:
yakbuild$ ./tools/rebuild.sh

Regards,

Helps also if I get the right sh in the tools directory… I meant rebuild.sh. It’s been a long day…

Paul,

Have you copied the exact error message you’re getting on the cmd line and pasted it to us yet ? If so, I’m not seeing it . . .

Thanks again, got it, understand now , it should be called from the top level directory. A bit slow … 8-).