All of lore.kernel.org
 help / color / mirror / Atom feed
* SND-SOC - how to test drivers ?
@ 2010-11-22 21:24 Vaclav Peroutka
  2010-11-23  0:07 ` Jassi Brar
  0 siblings, 1 reply; 9+ messages in thread
From: Vaclav Peroutka @ 2010-11-22 21:24 UTC (permalink / raw)
  To: alsa-devel

Hello all,

I am trying to develop ALSA driver for audio subsystem for one Android
mobile phone. I already have some messages in the kernel log - please
see below.

It means that I have s3c-i2s connected to MAX9880 (source code was not
IMHO tested). And then the output from MAX9880 goes into unknown
switching matrix ( for which I even don't have a datasheet - only
register list and names of bits in registers - I can guess what
purpose they serve to).

What I want is to make some testbench driver and an application which
can set switching matrix registers through IOCTL. In MAX9880 I want to
preset microphone path to output and switch matrix until I hear my
voice from microphone in speaker or headphones. Or, is there any
better method how to do that ?

AFAIK there is no alsamixer application for Android. What do you use
for path and gain settings in this case ?

And last question so far - where to look to fix this message: "Failed
to add route LMICIN->Mic Input" ? All other routes were added so far.

Thank you very much in advance,
Vaclav

<6>[    2.932154] Advanced Linux Sound Architecture Driver Version 1.0.18a.
<4>[    2.953782] No device for DAI MAX9880
<4>[    2.962009] No device for DAI s3c-i2s
<4>[    3.003635] I2S off
<4>[    3.019939] I2S off
<4>[    3.027948] Maxim MAX9880 Audio CODEC 0.12
<6>[    3.054919] max9880: max9880_init
<4>[    3.063481] Entered s3c24xx_pcm_new
<4>[    3.071566] Entered s3c24xx_pcm_preallocate_dma_buffer
<4>[    3.080354] Entered s3c24xx_pcm_preallocate_dma_buffer
<6>[    3.088901] asoc: MAX9880 <-> s3c-i2s mapping ok
<6>[    3.097441] max9880: max9880_dapm_event 769
<6>[    3.124311] max9880: max9880_dapm_event 0
<6>[    3.140593] max9880: max9880_add_widgets
<3>[    3.156166] Failed to add route LMICIN->Mic Input
<6>[    3.164204] max9880: max9880_add_controls
<6>[    3.203234] ALSA device list:
<6>[    3.210962]   #0: S3C6410 MAX9880 (MAX9880)

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

* Re: SND-SOC - how to test drivers ?
  2010-11-22 21:24 SND-SOC - how to test drivers ? Vaclav Peroutka
@ 2010-11-23  0:07 ` Jassi Brar
  2010-11-24 20:42   ` Vaclav Peroutka
  2010-11-30 21:14   ` Vaclav Peroutka
  0 siblings, 2 replies; 9+ messages in thread
From: Jassi Brar @ 2010-11-23  0:07 UTC (permalink / raw)
  To: Vaclav Peroutka; +Cc: alsa-devel

On Tue, Nov 23, 2010 at 6:24 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:

> What I want is to make some testbench driver and an application which
> can set switching matrix registers through IOCTL. In MAX9880 I want to
> preset microphone path to output and switch matrix until I hear my
> voice from microphone in speaker or headphones. Or, is there any
> better method how to do that ?
>
> AFAIK there is no alsamixer application for Android. What do you use
> for path and gain settings in this case ?

How about first making the driver work with some, non-Android, rootfs
that has alsa-utils ?

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

* Re: SND-SOC - how to test drivers ?
  2010-11-23  0:07 ` Jassi Brar
@ 2010-11-24 20:42   ` Vaclav Peroutka
  2010-11-24 20:46     ` Vaclav Peroutka
  2010-11-30 21:14   ` Vaclav Peroutka
  1 sibling, 1 reply; 9+ messages in thread
From: Vaclav Peroutka @ 2010-11-24 20:42 UTC (permalink / raw)
  To: Jassi Brar; +Cc: alsa-devel

2010/11/23 Jassi Brar <jassisinghbrar@gmail.com>:
> On Tue, Nov 23, 2010 at 6:24 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
>
>> What I want is to make some testbench driver and an application which
>> can set switching matrix registers through IOCTL. In MAX9880 I want to
>> preset microphone path to output and switch matrix until I hear my
>> voice from microphone in speaker or headphones. Or, is there any
>> better method how to do that ?
>>
>> AFAIK there is no alsamixer application for Android. What do you use
>> for path and gain settings in this case ?
>
> How about first making the driver work with some, non-Android, rootfs
> that has alsa-utils ?
>
I would maybe use ADB shell. Now I am trying to compile alsa-utils for
arm-linux but it needs ncurses library for alsamixer. Is there any
command-line replacement of alsamixer ?

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

* Re: SND-SOC - how to test drivers ?
  2010-11-24 20:42   ` Vaclav Peroutka
@ 2010-11-24 20:46     ` Vaclav Peroutka
  0 siblings, 0 replies; 9+ messages in thread
From: Vaclav Peroutka @ 2010-11-24 20:46 UTC (permalink / raw)
  To: Jassi Brar; +Cc: alsa-devel

> I would maybe use ADB shell. Now I am trying to compile alsa-utils for
> arm-linux but it needs ncurses library for alsamixer. Is there any
> command-line replacement of alsamixer ?

Sorry for the question, I probably found it. It is called "amixer"...

Vaclav

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

* Re: SND-SOC - how to test drivers ?
  2010-11-23  0:07 ` Jassi Brar
  2010-11-24 20:42   ` Vaclav Peroutka
@ 2010-11-30 21:14   ` Vaclav Peroutka
  2010-11-30 23:34     ` Jassi Brar
  1 sibling, 1 reply; 9+ messages in thread
From: Vaclav Peroutka @ 2010-11-30 21:14 UTC (permalink / raw)
  To: Jassi Brar; +Cc: alsa-devel

2010/11/23 Jassi Brar <jassisinghbrar@gmail.com>:
> On Tue, Nov 23, 2010 at 6:24 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
>
> How about first making the driver work with some, non-Android, rootfs
> that has alsa-utils ?
>

Hello, I did some progress, but not too much. I am getting "no
soundcards found" even if I have /dev/snd and /proc/asound like below.
What did I do wrong ?

Thank you in advance for answers.

$ ls -l /dev/snd
crw------- root     root     116,   3 2010-11-30 20:50 seq
crw------- root     root      14,   8 2010-11-30 20:50 sequencer2
crw------- root     root      14,   1 2010-11-30 20:50 sequencer
crw------- root     root     116,   2 2010-11-30 20:50 timer
crw-rw---- system   audio     14,   0 2010-11-30 20:50 mixer
crw------- root     root     116,   6 2010-11-30 20:50 controlC0
crw------- root     root      14,   4 2010-11-30 20:50 audio
crw-rw---- system   audio     14,   3 2010-11-30 20:50 dsp
crw------- root     root     116,   5 2010-11-30 20:50 pcmC0D0c
crw------- root     root     116,   4 2010-11-30 20:50 pcmC0D0p

$ ls /proc/asound
MAX9880
card0
pcm
timers
cards
devices
version
seq
oss

$ cat /proc/asound/devices
  2:        : timer
  3:        : sequencer
  4: [ 0- 0]: digital audio playback
  5: [ 0- 0]: digital audio capture
  6: [ 0]   : control

$ ls -l /proc/asound/card0
-rw-r--r-- root     root            0 2010-11-30 21:21 oss_mixer
-r--r--r-- root     root            0 2010-11-30 21:21 id
dr-xr-xr-x root     root              2010-11-30 21:21 pcm0c
dr-xr-xr-x root     root              2010-11-30 21:21 pcm0p

$ alsactl -d store card0
alsactl: save_state:1519: Cannot find soundcard 'card0'...

$ aplay -l
aplay: device_list:236: no soundcards found...

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

* Re: SND-SOC - how to test drivers ?
  2010-11-30 21:14   ` Vaclav Peroutka
@ 2010-11-30 23:34     ` Jassi Brar
  2010-12-01 10:30       ` Mark Brown
  2010-12-01 21:18       ` Vaclav Peroutka
  0 siblings, 2 replies; 9+ messages in thread
From: Jassi Brar @ 2010-11-30 23:34 UTC (permalink / raw)
  To: Vaclav Peroutka; +Cc: alsa-devel

On Wed, Dec 1, 2010 at 6:14 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
> 2010/11/23 Jassi Brar <jassisinghbrar@gmail.com>:
>> On Tue, Nov 23, 2010 at 6:24 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
>>
>> How about first making the driver work with some, non-Android, rootfs
>> that has alsa-utils ?
>>
>
> Hello, I did some progress, but not too much. I am getting "no
> soundcards found" even if I have /dev/snd and /proc/asound like below.
> What did I do wrong ?

Please make sure you use the same I2S device (indexed) in ASoC machine
driver as your board init file adds to the platform.

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

* Re: SND-SOC - how to test drivers ?
  2010-11-30 23:34     ` Jassi Brar
@ 2010-12-01 10:30       ` Mark Brown
  2010-12-01 21:18       ` Vaclav Peroutka
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2010-12-01 10:30 UTC (permalink / raw)
  To: Jassi Brar; +Cc: alsa-devel, Vaclav Peroutka

On Wed, Dec 01, 2010 at 08:34:48AM +0900, Jassi Brar wrote:

> Please make sure you use the same I2S device (indexed) in ASoC machine
> driver as your board init file adds to the platform.

For debugging stuff like this look at the files in debugfs for ASoC and
also #define DEBUG at the top of soc-core.c to get a bunch of trace
showing what's being registered and waited for.

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

* Re: SND-SOC - how to test drivers ?
  2010-11-30 23:34     ` Jassi Brar
  2010-12-01 10:30       ` Mark Brown
@ 2010-12-01 21:18       ` Vaclav Peroutka
  2010-12-02  0:43         ` Jassi Brar
  1 sibling, 1 reply; 9+ messages in thread
From: Vaclav Peroutka @ 2010-12-01 21:18 UTC (permalink / raw)
  To: Jassi Brar; +Cc: alsa-devel

2010/12/1 Jassi Brar <jassisinghbrar@gmail.com>:
> On Wed, Dec 1, 2010 at 6:14 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
>> 2010/11/23 Jassi Brar <jassisinghbrar@gmail.com>:
>>> On Tue, Nov 23, 2010 at 6:24 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:
>>>
>>> How about first making the driver work with some, non-Android, rootfs
>>> that has alsa-utils ?
>>>
>>
>> Hello, I did some progress, but not too much. I am getting "no
>> soundcards found" even if I have /dev/snd and /proc/asound like below.
>> What did I do wrong ?
>
> Please make sure you use the same I2S device (indexed) in ASoC machine
> driver as your board init file adds to the platform.
>

Unfortunately I don't know where to look. In the device the CPU
(s3c6410) has XPCM*0 pins connected to audio card and XPCM*1 pins
routed to GSM modem (not sure about that).

In the kernel sources I have several s3c_i2s sources. The raw one,
then s3c6410_i2s, s3c6410_i2s-v32 and s3c6410_i2s-v40. And they are
very different to each other. I am using s3c6410_i2s-v32 as it is used
in similar project. Anyway I am not sure which i2s file I should
use...

In kernel dmesg I have following:
<6>[    3.006951] Advanced Linux Sound Architecture Driver Version 1.0.18a.
<4>[    3.028690] No device for DAI MAX9880
<4>[    3.037007] No device for DAI s3c-i2s
<4>[    3.045335] [s3c6410_max9880_init][s3c6410_max9880_init]
platform_set_drvdata
<4>[    3.062157] s3c_i2s_probe
<4>[    3.070666] s3c_snd_txctrl
<4>[    3.078908] I2S off
<4>[    3.087042] s3c_snd_rxctrl
<4>[    3.095348] I2S off
<4>[    3.103452] Maxim MAX9880 Audio CODEC 0.12
<4>[    3.111595] max9880_probe assign i2c address
0x10max9880_codec_probe - max9880 found
<6>[    3.130565] max9880: max9880_init
<4>[    3.138988] Entered s3c24xx_pcm_new
<4>[    3.147131] Entered s3c24xx_pcm_preallocate_dma_buffer
<4>[    3.155941] Entered s3c24xx_pcm_preallocate_dma_buffer
<6>[    3.164518] asoc: MAX9880 <-> s3c-i2s mapping ok
<6>[    3.173180] max9880: max9880_dapm_event 769
<6>[    3.173193]
<6>[    3.200174] max9880: max9880_dapm_event 0
<6>[    3.200187]
<6>[    3.216540] max9880: max9880_add_widgets
<6>[    3.216554]
<3>[    3.232180] Failed to add route LMICIN->Mic Input
<6>[    3.240256] max9880: max9880_add_controls
<6>[    3.240271]
<6>[    3.437446] ALSA device list:
<6>[    3.443669]   #0: S3C6410 MAX9880 (MAX9880)

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

* Re: SND-SOC - how to test drivers ?
  2010-12-01 21:18       ` Vaclav Peroutka
@ 2010-12-02  0:43         ` Jassi Brar
  0 siblings, 0 replies; 9+ messages in thread
From: Jassi Brar @ 2010-12-02  0:43 UTC (permalink / raw)
  To: Vaclav Peroutka; +Cc: alsa-devel

On Thu, Dec 2, 2010 at 6:18 AM, Vaclav Peroutka <vaclavpe@gmail.com> wrote:

> In kernel dmesg I have following:
> <6>[    3.006951] Advanced Linux Sound Architecture Driver Version 1.0.18a.
> <4>[    3.028690] No device for DAI MAX9880
> <4>[    3.037007] No device for DAI s3c-i2s
> <4>[    3.045335] [s3c6410_max9880_init][s3c6410_max9880_init]
> platform_set_drvdata
> <4>[    3.062157] s3c_i2s_probe
> <4>[    3.070666] s3c_snd_txctrl
> <4>[    3.078908] I2S off
> <4>[    3.087042] s3c_snd_rxctrl
> <4>[    3.095348] I2S off

Wait... which kernel do you use?
It doesn't seem to be either upstream or samsung's.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2010-12-02  0:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-22 21:24 SND-SOC - how to test drivers ? Vaclav Peroutka
2010-11-23  0:07 ` Jassi Brar
2010-11-24 20:42   ` Vaclav Peroutka
2010-11-24 20:46     ` Vaclav Peroutka
2010-11-30 21:14   ` Vaclav Peroutka
2010-11-30 23:34     ` Jassi Brar
2010-12-01 10:30       ` Mark Brown
2010-12-01 21:18       ` Vaclav Peroutka
2010-12-02  0:43         ` Jassi Brar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.