Error building the latest sound-2.6-git tree

Hi Arun,

Based on your suggestion, I grabbed the latest snapshot/commit/tree
from sound-2.6-git, did a omap3_beagle_defconfig configuration and did
the build but I'm getting the following errors:
   ...
  CC arch/arm/mach-omap2/gpmc.o
  CC arch/arm/mach-omap2/timer-gp.o
  CC arch/arm/mach-omap2/powerdomain.o
  CC arch/arm/mach-omap2/clockdomain.o
  AS arch/arm/mach-omap2/sram34xx.o
  CC arch/arm/mach-omap2/clock34xx.o
  CC arch/arm/mach-omap2/board-omap3beagle.o
arch/arm/mach-omap2/board-omap3beagle.c: In function
'beagle_twl_gpio_setup':
arch/arm/mach-omap2/board-omap3beagle.c:132: error: 'TWL4030_GPIO_MAX'
undeclared (fir
st use in this function)
arch/arm/mach-omap2/board-omap3beagle.c:132: error: (Each undeclared
identifier is rep
orted only once
arch/arm/mach-omap2/board-omap3beagle.c:132: error: for each function
it appears in.)
arch/arm/mach-omap2/board-omap3beagle.c: At top level:
arch/arm/mach-omap2/board-omap3beagle.c:141: error: variable
'beagle_gpio_data' has in
itializer but incomplete type
arch/arm/mach-omap2/board-omap3beagle.c:142: error: unknown field
'gpio_base' specifie
d in initializer
arch/arm/mach-omap2/board-omap3beagle.c:142: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:142: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:143: error: unknown field
'irq_base' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:143: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:143: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:144: error: unknown field
'irq_end' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:144: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:144: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:145: error: unknown field
'use_leds' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:145: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:145: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:146: error: unknown field
'pullups' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:146: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:146: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:147: error: unknown field
'pulldowns' specifie
d in initializer
arch/arm/mach-omap2/board-omap3beagle.c:148: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:148: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:149: error: unknown field
'setup' specified in
initializer
arch/arm/mach-omap2/board-omap3beagle.c:149: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:149: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:152: error: variable
'beagle_twldata' has init
ializer but incomplete type
arch/arm/mach-omap2/board-omap3beagle.c:153: error: unknown field
'irq_base' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:153: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:153: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c:154: error: unknown field
'irq_end' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:154: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:154: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c:157: error: unknown field
'gpio' specified in
initializer
arch/arm/mach-omap2/board-omap3beagle.c:157: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:157: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c: In function
'omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:308: error: 'gpio' undeclared
(first use in th
is function)
make[1]: *** [arch/arm/mach-omap2/board-omap3beagle.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

I'm not sure if the latest snapshot has an issue with the beagleboard
configuration or I did something wrong. The latest snapshot was
obtained using git. Since I can't get this to build, I'll go back to
the snapshot that Steve Sakoman did ("ASoC: Complete Beagleboard
support" commit) 7 days ago. I tried use the web browser to grab that
snapshot (http://git.kernel.org/?p=linux/kernel/git/tiwai/
sound-2.6.git;a=snapshot;h=80c509fdd74f3b158267374cc55156965c8bf930)
but it hung at the the web page "Generating..." for over an hour. I'm
trying to use the git utility to grab that snapshot; since I'm a git
newbie, I have no idea how to get git to specify fetch Steve's
snapshot (80c509fdd74f3b158267374cc55156965c8bf930) 6 days ago. Does
anyone have the syntax? I was able to grab the latest using
      git clone http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
but I can't figure how to specify a specific commit/tag Id to grab.
Thanks.

Regards,
Andy

Hi Arun,

Based on your suggestion, I grabbed the latest snapshot/commit/tree
from sound-2.6-git, did a omap3_beagle_defconfig configuration and did
the build but I'm getting the following errors:

You have to clone
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git.
Then do a omap3_beagle_defconfig.

  ...
CC arch/arm/mach-omap2/gpmc.o
CC arch/arm/mach-omap2/timer-gp.o
CC arch/arm/mach-omap2/powerdomain.o
CC arch/arm/mach-omap2/clockdomain.o
AS arch/arm/mach-omap2/sram34xx.o
CC arch/arm/mach-omap2/clock34xx.o
CC arch/arm/mach-omap2/board-omap3beagle.o
arch/arm/mach-omap2/board-omap3beagle.c: In function
'beagle_twl_gpio_setup':
arch/arm/mach-omap2/board-omap3beagle.c:132: error: 'TWL4030_GPIO_MAX'
undeclared (fir
st use in this function)
arch/arm/mach-omap2/board-omap3beagle.c:132: error: (Each undeclared
identifier is rep
orted only once
arch/arm/mach-omap2/board-omap3beagle.c:132: error: for each function
it appears in.)
arch/arm/mach-omap2/board-omap3beagle.c: At top level:
arch/arm/mach-omap2/board-omap3beagle.c:141: error: variable
'beagle_gpio_data' has in
itializer but incomplete type
arch/arm/mach-omap2/board-omap3beagle.c:142: error: unknown field
'gpio_base' specifie
d in initializer
arch/arm/mach-omap2/board-omap3beagle.c:142: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:142: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:143: error: unknown field
'irq_base' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:143: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:143: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:144: error: unknown field
'irq_end' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:144: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:144: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:145: error: unknown field
'use_leds' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:145: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:145: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:146: error: unknown field
'pullups' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:146: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:146: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:147: error: unknown field
'pulldowns' specifie
d in initializer
arch/arm/mach-omap2/board-omap3beagle.c:148: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:148: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:149: error: unknown field
'setup' specified in
initializer
arch/arm/mach-omap2/board-omap3beagle.c:149: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:149: warning: (near
initialization for 'beagle
_gpio_data')
arch/arm/mach-omap2/board-omap3beagle.c:152: error: variable
'beagle_twldata' has init
ializer but incomplete type
arch/arm/mach-omap2/board-omap3beagle.c:153: error: unknown field
'irq_base' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:153: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:153: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c:154: error: unknown field
'irq_end' specified
in initializer
arch/arm/mach-omap2/board-omap3beagle.c:154: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:154: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c:157: error: unknown field
'gpio' specified in
initializer
arch/arm/mach-omap2/board-omap3beagle.c:157: warning: excess elements
in struct initia
lizer
arch/arm/mach-omap2/board-omap3beagle.c:157: warning: (near
initialization for 'beagle
_twldata')
arch/arm/mach-omap2/board-omap3beagle.c: In function
'omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:308: error: 'gpio' undeclared
(first use in th
is function)
make[1]: *** [arch/arm/mach-omap2/board-omap3beagle.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

I'm not sure if the latest snapshot has an issue with the beagleboard
configuration or I did something wrong. The latest snapshot was
obtained using git. Since I can't get this to build, I'll go back to
the snapshot that Steve Sakoman did ("ASoC: Complete Beagleboard
support" commit) 7 days ago. I tried use the web browser to grab that
snapshot (Kernel.org git repositories
sound-2.6.git;a=snapshot;h=80c509fdd74f3b158267374cc55156965c8bf930)
but it hung at the the web page "Generating..." for over an hour. I'm
trying to use the git utility to grab that snapshot; since I'm a git
newbie, I have no idea how to get git to specify fetch Steve's
snapshot (80c509fdd74f3b158267374cc55156965c8bf930) 6 days ago. Does
anyone have the syntax? I was able to grab the latest using
     git clone http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
but I can't figure how to specify a specific commit/tag Id to grab.
Thanks.

If you have a sound-git tree, just do

git-show 80c509fdd74f3b158267374cc55156965c8bf930 >
complete_beagleboard_support.patch

Then apply the complete_beagleboard_support.patch on top of the l-o
tree and compile.

From: Arun KS <getarunks@gmail.com>

...

You have to clone
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git.
Then do a omap3_beagle_defconfig.

Does that GIT link have the full ASoC BeagleBoard support? I think I tried it before and it doesn't have BeagleBoard audio support; so that's the reason I used the sound-2.6-git link you gave me in a previous email. I need audio to be working.

If you have a sound-git tree, just do

git-show 80c509fdd74f3b158267374cc55156965c8bf930 >
complete_beagleboard_support.patch

Then apply the complete_beagleboard_support.patch on top of the l-o
tree and compile.

I do have the sound-git tree but it's the latest snapshot (it has all the new updates since Steve's ASoC Complete BeagleBoard patch; I just obtained today. Since I'm getting the build errors (I mentioned previously), I wanted to go back to Steve's snapshot 7 days ago. Sorry for all the newbie questions, but how do I "reverse" patch to then using the current latest tree? Thanks.

Regards,
Andy

1)From sound-2.6-git, create the patch as i said before
git-show 80c509fdd74f3b158267374cc55156965c8bf930 >
complete_beagleboard_support.patch

2) Then apply this patch on top of l-o-git tree, then do a defconfig
and compile.

Once you apply the patch you can see the audio support on l-o git tree.
Basically you have to use l-o tree for your compilation.

1)From sound-2.6-git, create the patch as i said before
git-show 80c509fdd74f3b158267374cc55156965c8bf930 >
complete_beagleboard_support.patch

2) Then apply this patch on top of l-o-git tree, then do a defconfig
and compile.

Once you apply the patch you can see the audio support on l-o git tree.
Basically you have to use l-o tree for your compilation.

Oh, OK, now I get what you meant. I will try that. Thanks for your help and patience.

Regards,
Andy

1)From sound-2.6-git, create the patch as i said before
git-show 80c509fdd74f3b158267374cc55156965c8bf930 >
complete_beagleboard_support.patch

2) Then apply this patch on top of l-o-git tree, then do a defconfig
and compile.

Once you apply the patch you can see the audio support on l-o git tree.
Basically you have to use l-o tree for your compilation.

Hi Arun,

I followed your directions and was able to do a build successfully with BeagleBoard support. The kernel (2.6.29-rc2) (l-o latest with Steve's beagleboard complete audio patch) boots up fine and the audio driver seems to initialize fine and everything looks OK but when I tried to run a simple test:

[root@OMAP3EVM /root]# aplay test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
aplay: pcm_write:1266: write error: Input/output error

Has anyone experienced the same issue?

Here are some logs of the audio device that the kernel sees:

[root@OMAP3EVM bin]# dmesg
...
OMAP3 Beagle SoC init
TWL4030 Audio Codec init
asoc: twl4030 <-> omap-mcbsp-dai-0 mapping ok
ALSA device list:
  #0: omap3beagle (twl4030)
...

[root@OMAP3EVM bin]# cd /proc/asound
[root@OMAP3EVM asound]# cat devices
  0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
[root@OMAP3EVM asound]# cat cards
0 [omap3beagle ]: twl4030 - omap3beagle
                      omap3beagle (twl4030)
[root@OMAP3EVM asound]# cat version
Advanced Linux Sound Architecture Driver Version 1.0.18a.
[root@OMAP3EVM asound]# cat pcm
00-00: TWL4030 twl4030-0 : : playback 1 : capture 1