public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* quick test OMAP ALSA driver on H2
@ 2006-08-14 20:45 Zhang, Jian
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang, Jian @ 2006-08-14 20:45 UTC (permalink / raw)
  To: linux-omap-open-source

Hi everyone,

 

I managed to get a H2 board and booted an ALSA enabled kernel on it. The
kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a quick
test, I have manually created a pcm device node:

 

/dev/snd/pcmC0D0 116, 16, c

 

Then I cat a random file to this device node. I got "write error: File
descriptor in bad state" . It looks like I missed some necessary
configuration prior to using cat command. The kernel also has OSS
emulation, cat the same file to /dev/sound/dsp has generated the
expected noise which tells me the driver is basically working.  Can
someone (Mika, Daniel, David, Komal?) tell me what is required? A short
shell command sequence that makes noise via ALSA API would be very
useful and is greatly appreciated.  

 

Regards,

Jian

 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: quick test OMAP ALSA driver on H2
@ 2006-08-15 11:00 Daniel Petrini
  2006-08-15 14:44 ` Anderson Briglia
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Petrini @ 2006-08-15 11:00 UTC (permalink / raw)
  To: jzhang; +Cc: OMAP-Linux

Hi Jian,

Did you tried aplay and other applications from alsa-utils?
In my tests I always walked through that path.

HIH,

> Hi everyone,
>
> I managed to get a H2 board and booted an ALSA enabled kernel on it. The
> kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a quick
> test, I have manually created a pcm device node:
> /dev/snd/pcmC0D0 116, 16, c

[...]

> Regards,
>
> Jian

Regards,

Daniel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: quick test OMAP ALSA driver on H2
  2006-08-15 11:00 quick test OMAP ALSA driver on H2 Daniel Petrini
@ 2006-08-15 14:44 ` Anderson Briglia
  2006-08-15 16:12   ` Zhang, Jian
  0 siblings, 1 reply; 8+ messages in thread
From: Anderson Briglia @ 2006-08-15 14:44 UTC (permalink / raw)
  To: ext Daniel Petrini; +Cc: OMAP-Linux

Hi Jian,

ext Daniel Petrini wrote:
> Did you tried aplay and other applications from alsa-utils?
> In my tests I always walked through that path.

I compiled a kernel for H2 with ALSA driver (using the latest linux-omap git tree) and did
some tests (just played a wav file) using aplay. The sound was played properly.
You can check if the device is present using "aplay -l" command.

root@arm:~/sound# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: TSC2101 [H2 TSC2101], device 0: OMAP PCM [omap alsa pcm]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Regards,

Anderson Briglia

>> Hi everyone,
>>
>> I managed to get a H2 board and booted an ALSA enabled kernel on it. The
>> kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a quick
>> test, I have manually created a pcm device node:
>> /dev/snd/pcmC0D0 116, 16, c
> 
> 
> [...]
> 
>> Regards,
>>
>> Jian
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: quick test OMAP ALSA driver on H2
  2006-08-15 14:44 ` Anderson Briglia
@ 2006-08-15 16:12   ` Zhang, Jian
  2006-08-15 18:18     ` David Cohen
  2006-08-15 18:28     ` Anderson Briglia
  0 siblings, 2 replies; 8+ messages in thread
From: Zhang, Jian @ 2006-08-15 16:12 UTC (permalink / raw)
  To: Anderson Briglia, ext Daniel Petrini; +Cc: OMAP-Linux

Anderson and Daniel,

First of all, I appreciate your info. I completely ignored ALSA utils.
The ALSA web site did talk about directly cating a file to a PCM device
node. I thought that would be a quick & dirty check. Can you tell me the
devices under /dev/snd/?

Just downloaded alsa 1.0.11 utils and tried to cross compile it. The
following command doesn't seem to pass the right lib location. Any idea
what's going wrong?

$ CC=arm_v5t_le-gcc ./configure --target=arm-linux --host=i686-pc-linux
--prefix=~/alsa/alsa-lib-1.0.11/

....
checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
checking for libasound headers version >= 1.0.9... not present.
configure: error: Sufficiently new version of libasound not found.   


Regards,
Jian

-----Original Message-----
From: Anderson Briglia [mailto:anderson.briglia@indt.org.br] 
Sent: Tuesday, August 15, 2006 9:44 AM
To: ext Daniel Petrini
Cc: Zhang, Jian; OMAP-Linux
Subject: Re: quick test OMAP ALSA driver on H2

Hi Jian,

ext Daniel Petrini wrote:
> Did you tried aplay and other applications from alsa-utils?
> In my tests I always walked through that path.

I compiled a kernel for H2 with ALSA driver (using the latest linux-omap
git tree) and did
some tests (just played a wav file) using aplay. The sound was played
properly.
You can check if the device is present using "aplay -l" command.

root@arm:~/sound# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: TSC2101 [H2 TSC2101], device 0: OMAP PCM [omap alsa pcm]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Regards,

Anderson Briglia

>> Hi everyone,
>>
>> I managed to get a H2 board and booted an ALSA enabled kernel on it.
The
>> kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a
quick
>> test, I have manually created a pcm device node:
>> /dev/snd/pcmC0D0 116, 16, c
> 
> 
> [...]
> 
>> Regards,
>>
>> Jian
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: quick test OMAP ALSA driver on H2
  2006-08-15 16:12   ` Zhang, Jian
@ 2006-08-15 18:18     ` David Cohen
  2006-08-15 18:28     ` Anderson Briglia
  1 sibling, 0 replies; 8+ messages in thread
From: David Cohen @ 2006-08-15 18:18 UTC (permalink / raw)
  To: ext Zhang, Jian; +Cc: OMAP-Linux

Hi Jian,

ext Zhang, Jian wrote:
> Anderson and Daniel,
>
> First of all, I appreciate your info. I completely ignored ALSA utils.
> The ALSA web site did talk about directly cating a file to a PCM device
> node. I thought that would be a quick & dirty check. Can you tell me the
> devices under /dev/snd/?
>
> Just downloaded alsa 1.0.11 utils and tried to cross compile it. The
> following command doesn't seem to pass the right lib location. Any idea
> what's going wrong?
>
> $ CC=arm_v5t_le-gcc ./configure --target=arm-linux --host=i686-pc-linux
> --prefix=~/alsa/alsa-lib-1.0.11/
>
> ....
> checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
> checking for libasound headers version >= 1.0.9... not present.
> configure: error: Sufficiently new version of libasound not found.   
>
>   
It seems either you don't have the alsa-lib cross-compiled or you need
to pass the alsa-lib headers path.
BTW, why don't you try to use scratchbox to cross-compile? Could make
your task easier. :)

Kind regards,

David Cohen
> Regards,
> Jian
>
> -----Original Message-----
> From: Anderson Briglia [mailto:anderson.briglia@indt.org.br] 
> Sent: Tuesday, August 15, 2006 9:44 AM
> To: ext Daniel Petrini
> Cc: Zhang, Jian; OMAP-Linux
> Subject: Re: quick test OMAP ALSA driver on H2
>
> Hi Jian,
>
> ext Daniel Petrini wrote:
>   
>> Did you tried aplay and other applications from alsa-utils?
>> In my tests I always walked through that path.
>>     
>
> I compiled a kernel for H2 with ALSA driver (using the latest linux-omap
> git tree) and did
> some tests (just played a wav file) using aplay. The sound was played
> properly.
> You can check if the device is present using "aplay -l" command.
>
> root@arm:~/sound# aplay -l
> **** List of PLAYBACK Hardware Devices ****
> card 0: TSC2101 [H2 TSC2101], device 0: OMAP PCM [omap alsa pcm]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
>
> Regards,
>
> Anderson Briglia
>
>   
>>> Hi everyone,
>>>
>>> I managed to get a H2 board and booted an ALSA enabled kernel on it.
>>>       
> The
>   
>>> kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a
>>>       
> quick
>   
>>> test, I have manually created a pcm device node:
>>> /dev/snd/pcmC0D0 116, 16, c
>>>       
>> [...]
>>
>>     
>>> Regards,
>>>
>>> Jian
>>>       
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: quick test OMAP ALSA driver on H2
  2006-08-15 16:12   ` Zhang, Jian
  2006-08-15 18:18     ` David Cohen
@ 2006-08-15 18:28     ` Anderson Briglia
  2006-08-15 19:39       ` Zhang, Jian
  1 sibling, 1 reply; 8+ messages in thread
From: Anderson Briglia @ 2006-08-15 18:28 UTC (permalink / raw)
  To: ext Zhang, Jian; +Cc: OMAP-Linux

Hi Jian,

ext Zhang, Jian wrote:
> Anderson and Daniel,
> 
> First of all, I appreciate your info. I completely ignored ALSA utils.
> The ALSA web site did talk about directly cating a file to a PCM device
> node. I thought that would be a quick & dirty check. Can you tell me the
> devices under /dev/snd/?

Yes, sure:

root@arm:~# ls -la /dev/snd
crw-rw----   1 root audio 116,  0 Dec 31  1969 controlC0
crw-rw----   1 root audio 116, 24 Dec 31  1969 pcmC0D0c
crw-rw----   1 root audio 116, 16 Dec 31  1969 pcmC0D0p
crw-rw----   1 root audio 116, 33 Dec 31  1969 timer

> 
> Just downloaded alsa 1.0.11 utils and tried to cross compile it. The
> following command doesn't seem to pass the right lib location. Any idea
> what's going wrong?
> 
> $ CC=arm_v5t_le-gcc ./configure --target=arm-linux --host=i686-pc-linux
> --prefix=~/alsa/alsa-lib-1.0.11/
> 
> ....
> checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
> checking for libasound headers version >= 1.0.9... not present.
> configure: error: Sufficiently new version of libasound not found.   
> 

I did not cross-compile the alsa-utils, I just donwloaded the package from the default
Debian arm repository and installed into my root filesystem. But I believe the packages
for ARM platform are not available anymore, I don't know why.
This configuring problem seems that you have to download the libasound headers. Maybe you
can find it at ALSA official project's page.

Regards,

Anderson Briglia

> -----Original Message-----
> From: Anderson Briglia [mailto:anderson.briglia@indt.org.br] 
> Sent: Tuesday, August 15, 2006 9:44 AM
> To: ext Daniel Petrini
> Cc: Zhang, Jian; OMAP-Linux
> Subject: Re: quick test OMAP ALSA driver on H2
> 
> Hi Jian,
> 
> ext Daniel Petrini wrote:
> 
>>Did you tried aplay and other applications from alsa-utils?
>>In my tests I always walked through that path.
> 
> 
> I compiled a kernel for H2 with ALSA driver (using the latest linux-omap
> git tree) and did
> some tests (just played a wav file) using aplay. The sound was played
> properly.
> You can check if the device is present using "aplay -l" command.
> 
> root@arm:~/sound# aplay -l
> **** List of PLAYBACK Hardware Devices ****
> card 0: TSC2101 [H2 TSC2101], device 0: OMAP PCM [omap alsa pcm]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> 
> Regards,
> 
> Anderson Briglia
> 
> 
>>>Hi everyone,
>>>
>>>I managed to get a H2 board and booted an ALSA enabled kernel on it.
> 
> The
> 
>>>kernel boot log shows "H2 TSC2101" as the #0 ALSA device. To do a
> 
> quick
> 
>>>test, I have manually created a pcm device node:
>>>/dev/snd/pcmC0D0 116, 16, c
>>
>>
>>[...]
>>
>>
>>>Regards,
>>>
>>>Jian
>>
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: quick test OMAP ALSA driver on H2
  2006-08-15 18:28     ` Anderson Briglia
@ 2006-08-15 19:39       ` Zhang, Jian
  2006-08-18  2:18         ` lamikr
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang, Jian @ 2006-08-15 19:39 UTC (permalink / raw)
  To: Anderson Briglia, David Cohen; +Cc: OMAP-Linux

Hi Anderson and David,

I did successfully cross built alsa library first. The lib already
exists. 

I just googled alsa user mailing list archive. The same question was
asked and no answer was provided. Then googling alsa dev mailing list
gave me the solution. I have aplay crossed compiled by the following
command:

CC=arm_v5t_le-gcc ./configure --target=arm-linux --host=i686-pc-linux
--with-alsa-prefix=~/alsa/alsa-lib-1.0.11/src/.libs/
--with-alsa-inc-prefix=~/alsa/alsa-lib-1.0.11/include/  

But "aplay -l" gives the following error:
root@128.247.79.144:/# ./aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib control.c:816:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:231: control open (0): No such file or directory
root@128.247.79.144:/# cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer 

The kernel boot log does show H2 TSC2101 is initialized:
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22
13:55:50
2006 UTC).
audio support initialized
ALSA device list:
  #0: H2 TSC2101

Do I miss something? (BTW, I have the exact same device nodes as yours).
I noticed GIT has alsa 1.0.12rc2 while my user library is 1.0.11. Can
this be the problem? (I don't think it is)

Would you please send me your working libasound.so and aplay in a direct
email?

Regards,
Jian

-----Original Message-----
From: Anderson Briglia [mailto:anderson.briglia@indt.org.br] 
Sent: Tuesday, August 15, 2006 1:29 PM
To: Zhang, Jian
Cc: ext Daniel Petrini; OMAP-Linux
Subject: Re: quick test OMAP ALSA driver on H2

Hi Jian,

ext Zhang, Jian wrote:
> Anderson and Daniel,
> 
> First of all, I appreciate your info. I completely ignored ALSA utils.
> The ALSA web site did talk about directly cating a file to a PCM
device
> node. I thought that would be a quick & dirty check. Can you tell me
the
> devices under /dev/snd/?

Yes, sure:

root@arm:~# ls -la /dev/snd
crw-rw----   1 root audio 116,  0 Dec 31  1969 controlC0
crw-rw----   1 root audio 116, 24 Dec 31  1969 pcmC0D0c
crw-rw----   1 root audio 116, 16 Dec 31  1969 pcmC0D0p
crw-rw----   1 root audio 116, 33 Dec 31  1969 timer

> 
> Just downloaded alsa 1.0.11 utils and tried to cross compile it. The
> following command doesn't seem to pass the right lib location. Any
idea
> what's going wrong?
> 
> $ CC=arm_v5t_le-gcc ./configure --target=arm-linux
--host=i686-pc-linux
> --prefix=~/alsa/alsa-lib-1.0.11/
> 
> ....
> checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
> checking for libasound headers version >= 1.0.9... not present.
> configure: error: Sufficiently new version of libasound not found.   
> 

I did not cross-compile the alsa-utils, I just donwloaded the package
from the default
Debian arm repository and installed into my root filesystem. But I
believe the packages
for ARM platform are not available anymore, I don't know why.
This configuring problem seems that you have to download the libasound
headers. Maybe you
can find it at ALSA official project's page.

Regards,

Anderson Briglia

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: quick test OMAP ALSA driver on H2
  2006-08-15 19:39       ` Zhang, Jian
@ 2006-08-18  2:18         ` lamikr
  0 siblings, 0 replies; 8+ messages in thread
From: lamikr @ 2006-08-18  2:18 UTC (permalink / raw)
  To: Zhang, Jian; +Cc: OMAP-Linux


> The kernel boot log does show H2 TSC2101 is initialized:
> Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22
> 13:55:50
> 2006 UTC).
> audio support initialized
> ALSA device list:
>   #0: H2 TSC2101
>
> Do I miss something? (BTW, I have the exact same device nodes as yours).
> I noticed GIT has alsa 1.0.12rc2 while my user library is 1.0.11. Can
> this be the problem? (I don't think it is)
>   
Hi Jian

>From off the list emails I know you got this working by setting up the
alsa util config files.
But just for the record for you and others, I copy pasted the output of
couple of commands
displaying info from the tsc2101 alsa drivers when they are succesfully
loaded and configured.

#root@h6300:/home/lamikr# lsmod
Module Size Used by
hidp 12416 2
irda 116040 0
snd_pcm_oss 56256 0
snd_omap_alsa_tsc2101 19448 1
snd_pcm 86536 2 snd_pcm_oss,snd_omap_alsa_tsc2101
snd_timer 21508 1 snd_pcm
snd_page_alloc 6728 1 snd_pcm
snd_mixer_oss 15104 2 snd_pcm_oss
snd 49048 5
snd_pcm_oss,snd_omap_alsa_tsc2101,snd_pcm,snd_timer,snd_mixer_oss
rfcomm 33880 0
omapts 4720 0
omap_keypad 6936 0
l2cap 19716 10 hidp,rfcomm
hci_uart 15836 0
bluetooth 42524 6 hidp,rfcomm,l2cap,hci_uart
h6300_bt 3456 0

#root@h6300:/home/lamikr# ls -la /proc/asound/
dr-xr-xr-x 5 root root 0 Jan 1 04:05 .
dr-xr-xr-x 73 root root 0 Jan 1 00:00 ..
lrwxrwxrwx 1 root root 5 Jan 1 04:05 TSC2101 -> card0
dr-xr-xr-x 4 root root 0 Jan 1 04:05 card0
-r--r--r-- 1 root root 0 Jan 1 04:05 cards
-r--r--r-- 1 root root 0 Jan 1 04:05 devices
-r--r--r-- 1 root root 0 Jan 1 04:05 modules
dr-xr-xr-x 2 root root 0 Jan 1 04:05 oss
-r--r--r-- 1 root root 0 Jan 1 04:05 pcm
dr-xr-xr-x 2 root root 0 Jan 1 04:05 seq
-r--r--r-- 1 root root 0 Jan 1 04:05 timers
-r--r--r-- 1 root root 0 Jan 1 04:05 version

#root@h6300:/home/lamikr# ls -la /proc/asound/card0/
dr-xr-xr-x 4 root root 0 Jan 1 04:05 .
dr-xr-xr-x 5 root root 0 Jan 1 04:05 ..
-r--r--r-- 1 root root 0 Jan 1 04:05 id
-rw-r--r-- 1 root root 0 Jan 1 04:05 oss_mixer
dr-xr-xr-x 3 root root 0 Jan 1 04:05 pcm0c
dr-xr-xr-x 3 root root 0 Jan 1 04:05 pcm0p

#root@h6300:/home/lamikr# cat /proc/asound/modules
0 snd_omap_alsa_tsc2101
root@h6300:/home/lamikr# cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer

#root@h6300:/home/lamikr# aplay track_01.wav
Playing WAVE 'track_01.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
^XAborted by signal Interrupt...

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-08-18  2:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-15 11:00 quick test OMAP ALSA driver on H2 Daniel Petrini
2006-08-15 14:44 ` Anderson Briglia
2006-08-15 16:12   ` Zhang, Jian
2006-08-15 18:18     ` David Cohen
2006-08-15 18:28     ` Anderson Briglia
2006-08-15 19:39       ` Zhang, Jian
2006-08-18  2:18         ` lamikr
  -- strict thread matches above, loose matches on Subject: below --
2006-08-14 20:45 Zhang, Jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox