public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* ALSA with OMAP1510
@ 2006-03-16 12:25 Prakash Narayanan M
  2006-03-16 17:27 ` Daniel Petrini
  0 siblings, 1 reply; 7+ messages in thread
From: Prakash Narayanan M @ 2006-03-16 12:25 UTC (permalink / raw)
  To: linux-omap-open-source

Hai All

 

Thanks first of all to Mika, Komal and Nishanth.....now I have made
2.6.14 up and running on OMAP1510 Innovator.

 

The ALSA part is compiled with kernel.  Now when I do #cat test.raw >
/dev/dsp no response from the audio device.  I have created and tested
test.raw in my host machine.  

 

Also I used a C program to check the audio device.

1. opens /dev/mixer and set the mic gain to 100 and close /dev/mixer
2. opens /dev/dsp (Read only mode) and set the parameters
3. reads the mic values to a buffer and close /dev/dsp
4. opens /dev/mixer and set the mic gain to 0 and close /dev/mixer
5. opens /dev/dsp (Write only mode) and set the parameters
6. write the buffer to /dev/dsp device



 OBSERVATIONS:

          arg = 16;       /* sample size */
          status = ioctl(fd, SOUND_PCM_READ_BITS, &arg);
          if (arg != SIZE)    ////// I find arg is returned with 8
instead of 16 
            perror("unable to set sample size");
 
Similarly for the following 
        status = ioctl(fd, SOUND_PCM_READ_CHANNELS, &arg);
2 channels asked and 1 returned
 
        status = ioctl(fd, SOUND_PCM_READ_RATE, &arg);
rate asked 44100 returned 8000
 

How do I go about testing the sound device in OMAP1510 Innovator ?

How do I go about trouble shooting ALSA?

 

 

Thanks in advance

Regards

Prakash

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: ALSA with OMAP1510
@ 2006-03-17 12:21 Prakash Narayanan M
  2006-03-17 13:06 ` Komal Shah
  2006-03-17 13:42 ` Daniel Petrini
  0 siblings, 2 replies; 7+ messages in thread
From: Prakash Narayanan M @ 2006-03-17 12:21 UTC (permalink / raw)
  To: linux-omap-open-source

Hai

I am using TI Innovator OMAP1510 kit (This does not have tsc2101, but
AIC23 is the codec and ADS7846 touch screen controller). Kernel 2.6.14
toolchain gcc3.4.1. 

1) While selecting ALSA in menuconfig (kernel 2.6.14), is it required to
select AIC23 separately somewhere (I do not know where) for ALSA to
work?

2) If I select OSK5912 it gives the following error.
ALSA / OSK5912 enabled sound/built-in.o(.text+0x3c16c): 
In function `$a':
: undefined reference to `OMAP_DMA_CCR' sound/built-in.o(.text+0x3c178):

In function `$a': : undefined reference to `OMAP_DMA_CCR'


3) If I select OSS driver also along with ALSA the following error is
observed.

OSS Sound modules / Persistent DMA buffers enabled
sound/oss/soundcard.c:68: error: `MAX_DMA_CHANNELS' undeclared here (not
in a function)
sound/oss/soundcard.c:68: error: storage size of `dma_alloc_map' isn't
known sound/oss/soundcard.c:68: warning: 'dma_alloc_map' defined but not
used make[2]: *** [sound/oss/soundcard.o] Error 1 make[1]: ***
[sound/oss] Error 2 make: *** [sound]

4) Do you have any idea of the source of error (or what to do)?

5) Also does "aplay" gets compiled with the kernel if you select ALSA
driver?
What we have to do to get "aplay" also compiled?

Hope kernel-2.6.14 / ALSA supports sound in OMAP1510 TI Innovator.

Thanks in advance
Regards
Prakash


-----Original Message-----
From: lamikr [mailto:lamikr@cc.jyu.fi] 
Sent: Thursday, March 16, 2006 11:42 PM
To: Daniel Petrini
Cc: Prakash Narayanan M; linux-omap-open-source@linux.omap.com
Subject: Re: ALSA with OMAP1510


>You should use "aplay test.raw" to play using alsa stack.
>  
>
Yes, for alsa driver the "aplay" should be the easiest solution.
I have myself used alsa succesfully with the tsc2101 chipset and latest
kernel in git repository (about 2.6.16-rc5)
by applying the 3 patches I and daniel send for the list about 10 days
ago.

Daniel tested the tsc2101 and aic23 drivers by using OSK and H2 boards.
I used myself omap1510 based h6300 for writing and testing. With that
board there were two issues compared to other devices that I needed to
handle.

1) I needed to add following to audio_process_dma() in
sound/arm/omap_alsa.c that was was not needed by other boards.
    Without this, the dma stopped after first small buffer transfered.
If you have problems you could enable that also for your boards.

#ifdef CONFIG_MACH_OMAP_H6300
        spin_lock_irqsave(&s->dma_lock, flags);
        omap_stop_alsa_sound_dma(s);
        spin_unlock_irqrestore(&s->dma_lock, flags);
#endif

2) In sound/arm/omap/omap-alsa-tsc2101.c tsc2101_snd_omap_alsa_playback
structure h6300 needs to be configured to have 8 bit dma.
(this is not yet in the patch sent to the list)

#ifdef CONFIG_MACH_OMAP_H6300
    .formats = (SNDRV_PCM_FMTBIT_S8),
#else
    .formats = (SNDRV_PCM_FMTBIT_S16_LE),
#endif

If you want to test the play with different samplerates, you can use a
program called "sox" for creating wavs with different samplerates.
(sox song.wav -r 8000 -c 1  -s -w song8000.wav)
**
Mika

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

end of thread, other threads:[~2006-03-17 13:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-16 12:25 ALSA with OMAP1510 Prakash Narayanan M
2006-03-16 17:27 ` Daniel Petrini
2006-03-16 17:29   ` Daniel Petrini
2006-03-16 18:12   ` lamikr
  -- strict thread matches above, loose matches on Subject: below --
2006-03-17 12:21 Prakash Narayanan M
2006-03-17 13:06 ` Komal Shah
2006-03-17 13:42 ` Daniel Petrini

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