Skip to contentSkip to conversation

Takashi: please help (compiling alsa-driver)

DISCUSSION Jonas Petersen 3 participants 7 messages Feb 12, 2013 – Feb 15, 2013

lore
Share & tools
lore
#0 lore raw

Hi Takashi,

I'm talking to you directly because this

ftp://ftp.suse.com/pub/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz

is the only alsa-driver source that I'm able to compile so far. I can unpack this and simply run ./configure && make && make install. It works great. (I compile against the kernel-headers from ubuntu).

I spent hours in trying to compile from several other sources.

* The plain1.0.25 release (complains about missing symbols).
* The snapshots fromhttp://www.alsa-project.org/snapshot/ (will complain about missing 'uapi' stuff)
* Btw. where did the snapshots fromhttp://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/ go (Advertised here:http://www.alsa-project.org/main/index.php/Download)?
* Checked out alsa-driver from git. But no luck, tried many things. e.g.: Branch release, then autoconf, but not even ./configure succeeds.

Id like to submit some patches and be able to work with the current state from git. How is that supposed to work?

Btw. I often read that the alsa-kernel is needed to compile. But it is not neede with this above mentioned 'unstable-snapshot'. It will just compile against the ubuntu kernel-headers (Lubuntu 12.10).

How do you generate these snapshots?

Thanks and sorry if that's stupid questions..
Jonas

#1 lore raw
Quoted 4 lines

I'm talking to you directly because this

ftp://ftp.suse.com/pub/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz

Quoted 2 lines

is the only alsa-driver source that I'm able to compile so far. I can

unpack this and simply run ./configure && make && make install. It works great. (I compile against the kernel-headers from ubuntu).

But there are warning message for four sound card modules when build in Ubuntu 12.04 LTS

Section mismatch in reference from the function snd_bt87x_detect_card() to the variable .devinit.rodata:snd_bt87x_ids
The function snd_bt87x_detect_card() references
the variable __devinitconst snd_bt87x_ids.
This is often because snd_bt87x_detect_card lacks a __devinitconst annotation or the annotation of snd_bt87x_ids is wrong.

Section mismatch in reference from the function generic_oxygen_probe() to the variable .devinit.rodata:oxygen_ids
The function generic_oxygen_probe() references
the variable __devinitconst oxygen_ids.
This is often because generic_oxygen_probe lacks a __devinitconst annotation or the annotation of oxygen_ids is wrong.

Section mismatch in reference from the function xonar_probe() to the variable .devinit.rodata:xonar_ids
The function xonar_probe() references
the variable __devinitconst xonar_ids.
This is often because xonar_probe lacks a __devinitconst annotation or the annotation of xonar_ids is wrong.

Do the latest version of alsa-lib require any specific parameter to install on Ubuntu 12.04 for testing the channel map ?

alsa-lib/test/chmap -D hw:0 query

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2223:(snd_pcm_open_noupdate) Unknown PCM hw:0 Cannot open PCM stream hw:1 for PLAYBACK

Quoted 3 lines

I spent hours in trying to compile from several other sources.

What is the proper way to build from git since alsa-driver-build.git only contain README

The snapshot in alsa-project.org is also unusable

#2 lore raw

At Wed, 13 Feb 2013 08:31:38 +0800,

Quoted 28 lines · Raymond Yau
Quoted 5 lines

I'm talking to you directly because this

ftp://ftp.suse.com/pub/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz

Quoted 2 lines

is the only alsa-driver source that I'm able to compile so far. I can

unpack this and simply run ./configure && make && make install. It works great. (I compile against the kernel-headers from ubuntu).

But there are warning message for four sound card modules when build in Ubuntu 12.04 LTS

Section mismatch in reference from the function snd_bt87x_detect_card() to the variable .devinit.rodata:snd_bt87x_ids
The function snd_bt87x_detect_card() references
the variable __devinitconst snd_bt87x_ids.
This is often because snd_bt87x_detect_card lacks a __devinitconst annotation or the annotation of snd_bt87x_ids is wrong.

Section mismatch in reference from the function generic_oxygen_probe() to the variable .devinit.rodata:oxygen_ids
The function generic_oxygen_probe() references
the variable __devinitconst oxygen_ids.
This is often because generic_oxygen_probe lacks a __devinitconst annotation or the annotation of oxygen_ids is wrong.

Quoted 6 lines

Section mismatch in reference from the function xonar_probe() to the variable .devinit.rodata:xonar_ids
The function xonar_probe() references
the variable __devinitconst xonar_ids.
This is often because xonar_probe lacks a __devinitconst annotation or the annotation of xonar_ids is wrong.

These errors can be ignored.
It happens because __devinit* stuff have been dropped in the upstream kernel.

Quoted 9 lines

Do the latest version of alsa-lib require any specific parameter to install on Ubuntu 12.04 for testing the channel map ?

alsa-lib/test/chmap -D hw:0 query

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2223:(snd_pcm_open_noupdate) Unknown PCM hw:0 Cannot open PCM stream hw:1 for PLAYBACK

Seem you didn't install the conf_pulse module properly, no?

Quoted 5 lines
Quoted 2 lines

I spent hours in trying to compile from several other sources.

What is the proper way to build from git since alsa-driver-build.git only contain README

The build stuff is included in build branch as seen in README.

Takashi

#3 lore raw
Quoted 4 lines
Quoted 4 lines

Do the latest version of alsa-lib require any specific parameter to install on Ubuntu 12.04 for testing the channel map ?

Quoted 9 lines
Quoted 6 lines

alsa-lib/test/chmap -D hw:0 query

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2223:(snd_pcm_open_noupdate) Unknown PCM hw:0 Cannot open PCM stream hw:0 for PLAYBACK

Seem you didn't install the conf_pulse module properly, no?

alsa-lib/test/chmap can be built but fail to compile aplay

make[1]: Entering directory `/home/raymond/alsa-utils/aplay'
gcc -O2 -Wall -pipe -g -o aplay aplay.o -lrt -lasound -lm -ldl -lpthread
aplay.o: In function `setup_chmap':
/home/raymond/alsa-utils/aplay/aplay.c:1148: undefined reference to snd_pcm_set_chmap' /home/raymond/alsa-utils/aplay/aplay.c:1152: undefined reference to snd_pcm_get_chmap' /home/raymond/alsa-utils/aplay/aplay.c:1188: undefined reference to `snd_pcm_chmap_print'
aplay.o: In function `main':
/home/raymond/alsa-utils/aplay/aplay.c:707: undefined reference to `snd_pcm_chmap_parse_string'
collect2: ld returned 1 exit status
make[1]: *** [aplay] Error 1
make[1]: Leaving directory `/home/raymond/alsa-utils/aplay'
make: *** [all-recursive] Error 1

#4 lore raw

At Thu, 14 Feb 2013 11:20:11 +0800,

Quoted 18 lines · Raymond Yau
Quoted 5 lines
Quoted 5 lines

Do the latest version of alsa-lib require any specific parameter to install on Ubuntu 12.04 for testing the channel map ?

Quoted 9 lines
Quoted 6 lines

alsa-lib/test/chmap -D hw:0 query

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2223:(snd_pcm_open_noupdate) Unknown PCM hw:0 Cannot open PCM stream hw:0 for PLAYBACK

Seem you didn't install the conf_pulse module properly, no?

alsa-lib/test/chmap can be built but fail to compile aplay

Quoted 16 lines

make[1]: Entering directory `/home/raymond/alsa-utils/aplay'
gcc -O2 -Wall -pipe -g -o aplay aplay.o -lrt -lasound -lm -ldl -lpthread
aplay.o: In function `setup_chmap':
/home/raymond/alsa-utils/aplay/aplay.c:1148: undefined reference to snd_pcm_set_chmap' /home/raymond/alsa-utils/aplay/aplay.c:1152: undefined reference to snd_pcm_get_chmap' /home/raymond/alsa-utils/aplay/aplay.c:1188: undefined reference to `snd_pcm_chmap_print'
aplay.o: In function `main':
/home/raymond/alsa-utils/aplay/aplay.c:707: undefined reference to `snd_pcm_chmap_parse_string'
collect2: ld returned 1 exit status
make[1]: *** [aplay] Error 1
make[1]: Leaving directory `/home/raymond/alsa-utils/aplay'
make: *** [all-recursive] Error 1

Did you pass the proper --libdir option to configure script when you build & install alsa-lib?

Takashi

#5 lore raw
In reply to Jonas Petersen

At Tue, 12 Feb 2013 22:58:37 +0100,

Quoted 16 lines · Jonas Petersen

Hi Takashi,

I'm talking to you directly because this

ftp://ftp.suse.com/pub/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz

is the only alsa-driver source that I'm able to compile so far. I can unpack this and simply run ./configure && make && make install. It works great. (I compile against the kernel-headers from ubuntu).

I spent hours in trying to compile from several other sources.

* The plain1.0.25 release (complains about missing symbols).
* The snapshots fromhttp://www.alsa-project.org/snapshot/ (will complain about missing 'uapi' stuff)
* Btw. where did the snapshots fromhttp://ftp.kernel.org/pub/linux/kernel/people/tiwai/alsa/ go (Advertised here:http://www.alsa-project.org/main/index.php/Download)?
* Checked out alsa-driver from git. But no luck, tried many things. e.g.: Branch release, then autoconf, but not even ./configure succeeds.

Quoted 5 lines

Id like to submit some patches and be able to work with the current state from git. How is that supposed to work?

Btw. I often read that the alsa-kernel is needed to compile. But it is not neede with this above mentioned 'unstable-snapshot'. It will just compile against the ubuntu kernel-headers (Lubuntu 12.10).

How do you generate these snapshots?

You need to have two git trees: sound.git tree containing the complete Linux kernel tree, and alsa-driver-build.git containing only the build stub for external builds.

In the recent change, alsa-driver-build.git (or equivalent with alsa-driver.git in alsa-project.org) contains only README in master branch. Checkout build branch instead. Then you'll get the whole build stuff in alsa/ subdirectory. Go into alsa subdirectory, then run

	ALSAKERNELDIR=../../sound ./gitcompile --with-debug=full --enable-dynamic-minors

Alternatively, you can pull the alsa-driver-built git into kernel tree directly. Then go to alsa subdirectory and run gitcompile. In that case, you can omit passing "ALSAKERNELDIR=..." argument.

Takashi

#6 lore raw

Am 13.02.2013 07:51, schrieb Takashi Iwai:

Quoted 12 lines

At Tue, 12 Feb 2013 22:58:37 +0100,

Quoted 1 line · Jonas Petersen

How do you generate these snapshots?

You need to have two git trees: sound.git tree containing the complete Linux kernel tree, and alsa-driver-build.git containing only the build stub for external builds.

In the recent change, alsa-driver-build.git (or equivalent with alsa-driver.git in alsa-project.org) contains only README in master branch. Checkout build branch instead. Then you'll get the whole build stuff in alsa/ subdirectory. Go into alsa subdirectory, then run

Quoted 5 lines
	ALSAKERNELDIR=../../sound ./gitcompile --with-debug=full --enable-dynamic-minors

Alternatively, you can pull the alsa-driver-built git into kernel tree directly. Then go to alsa subdirectory and run gitcompile. In that case, you can omit passing "ALSAKERNELDIR=..." argument.

Thank you very much, that did help!

It didn't exactly answer my distinct question ("How do you generate these snapshots?"), but I was able to figure it out by myself now.

After some manual copying and linking and investigating I finally found what I need need to do:

$ ./utils/setup-alsa-kernel -c ../../sound

After that I can copy just the 'alsa' folder to another machine and it wil build.

The problem is, this procedure requires 1.6 GB of disk space. I'm building on another system that does not have that much space right now. The mentioned snapshot (and now the result from the 'setup-alsa-kernel' script) is consuming only about 100 MB after a full build.

These are all steps required:

~$ mkdir tiwai; cd tiwai
~/tiwai$ git clone git://github.com/tiwai/alsa-driver-build.git
~/tiwai$ git clone git://github.com/tiwai/sound.git
~/tiwai$ cd alsa-driver-build
~/tiwai/alsa-driver-build$ git checkout build ~/tiwai/alsa-driver-build$ cd alsa ~/tiwai/alsa-driver-build/alsa$ ./utils/setup-alsa-kernel -c ../../sound

Now the alsa folder contains everything needed.
Finally:

some-other-machine/alsa$ ./gitcompile --with-debug=full --enable-dynamic-minors

Regards
Jonas