public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* A problem about tsc2101 omap audio alsa driver on H3 board
@ 2006-10-25 12:49 Ningzhong Miao - 苗宁忠
  2006-10-25 23:29 ` lamikr
  0 siblings, 1 reply; 3+ messages in thread
From: Ningzhong Miao - 苗宁忠 @ 2006-10-25 12:49 UTC (permalink / raw)
  To: linux-omap-open-source

Kernel : 2.6.16

Patch: linux-2.6.16-omap1 from www.muru.com <http://www.muru.com/> 

Board: omap1710 H3

Rootfs : NFS

 

I don’t know why don’t define h3_mcbsp1_device in arch/arm/mach-omap1/borad-h3.c, but it is defined in board-h2.c.

So I copy the belowed data from board-h2.c to board-h3.c. 

 

static struct omap_mcbsp_reg_cfg mcbsp_regs = {

        .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),

        .spcr1 = RINTM(3) | RRST,

        .rcr2  = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |

                RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),

        .rcr1  = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),

        .xcr2  = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |

                XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,

        .xcr1  = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),

        .srgr1 = FWID(15),

        .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),

 

        .pcr0  = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,

        //.pcr0 = CLKXP | CLKRP,        /* mcbsp: slave */

};

 

static struct omap_alsa_codec_config alsa_config = {

        .name                   = "H3 TSC2101",

        .mcbsp_regs_alsa        = &mcbsp_regs,

        .codec_configure_dev    = NULL, // tsc2101_configure,

        .codec_set_samplerate   = NULL, // tsc2101_set_samplerate,

        .codec_clock_setup      = NULL, // tsc2101_clock_setup,

        .codec_clock_on         = NULL, // tsc2101_clock_on,

        .codec_clock_off        = NULL, // tsc2101_clock_off,

        .get_default_samplerate = NULL, // tsc2101_get_default_samplerate,

};

 

static struct platform_device h3_mcbsp1_device = {

        .name   = "omap_alsa_mcbsp",

        .id     = 1,

        .dev = {

                .platform_data  = &alsa_config,

        },

};

static struct platform_device *devices[] __initdata = {

        &nor_device,

        &nand_device,

        &smc91x_device,

        &intlat_device,

        &h3_irda_device,

        &h3_kp_device,

        &h3_lcd_device,

        &h3_mcbsp1_device,

};

 

These codes need to be modified ? mcbsp_regs is same with h2 ?? 

Anyway, I don’t modify anything.

I defined DEBUG in include/asm/arch/omap-alsa.h and defined CONFIG_MCBSP_DEBUG in arch/arm/plat-omap/mcbsp.c.

 

Then I run aplay in H3 board.

[root@Linux /root]#alsa-lib/bin/aplay microsoft.wav

XXX Alsa debug f:snd_card_omap_alsa_open, l:315

<tsc2101_clock_on>: clock use count = 1

MCLK already in use at 12000000 Hz. We change it to 12000000 Hz

<tsc2101_clock_on>: old clock rate = 12000000

omap_alsa_tsc2101_clock_on(), no need to change rate, no need to change clock ra

te, rate already 12000000 Hz.

<tsc2101_clock_on>: MCLK = 12000000 [12000000], usecount = 2, clk_enable retval

= 0

Playing WAVE 'microsoft.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono

XXX Alsa debug f:snd_omap_alsa_prepare, l:288

XXX Alsa debug f:tsc2101_set_samplerate, l:217

XXX Alsa debug f:snd_omap_alsa_trigger, l:260

XXX Alsa debug f:audio_process_dma, l:197

[omap_start_alsa_sound_dma]: start

[audio_set_dma_params_play]: start

[audio_set_dma_params_play]: end(0)

[audio_start_dma_chain]: start

**** MCBSP1 regs ****

DRR2:  0x0000

DRR1:  0x0000

DXR2:  0x0000

DXR1:  0x0000

SPCR2: 0x02f1

SPCR1: 0x0031

RCR2:  0x8041

RCR1:  0x0040

XCR2:  0x8045

XCR1:  0x0040

SRGR2: 0xd01f

SRGR1: 0x0f00

PCR0:  0x030f

***********************

[audio_start_dma_chain]: end(0)

[omap_start_alsa_sound_dma]: end(0)

XXX Alsa debug f:snd_omap_alsa_pointer, l:303

XXX Alsa debug f:audio_get_dma_pos, l:143

 

The program died here, and earphone don’t have any sound.

I have tried oss audio driver and 2.6.17 kernel. They are same.

 

Anybody come across this problem ?? help me, thank you !

 

 

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: A problem about tsc2101 omap audio alsa driver on H3 board
@ 2006-10-27  1:51 Ningzhong Miao - 苗宁忠
  0 siblings, 0 replies; 3+ messages in thread
From: Ningzhong Miao - 苗宁忠 @ 2006-10-27  1:51 UTC (permalink / raw)
  To: lamikr; +Cc: linux-omap-open-source

Dear lamikr:

	It's same. The below is printed messages. The program stopped and no sound in STEREO HEADSET.

[root@Linux /root]#alsa-lib/bin/amixer scontents
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 100
  Mono:
  Front Left: Playback 90 [90%] [on]
  Front Right: Playback 90 [90%] [on]
Simple mixer control 'Playback',0
  Capabilities: enum
  Items: 'Loudspeaker' 'Headphone'
  Item0: 'Headphone'
Simple mixer control 'Handset',2
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 100
  Mono: Playback 21 [21%] [on]
Simple mixer control 'Headset',1
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 100
  Mono: Playback 69 [69%] [on]
[root@Linux /root]#
[root@Linux /root]#
[root@Linux /root]#alsa-lib/bin/aplay microsoft.wav 
MCLK already in use at 12000000 Hz. We change it to 12000000 Hz
omap_alsa_tsc2101_clock_on(), no need to change rate, no need to change clock rate, rate already 12000000 Hz.
Playing WAVE 'microsoft.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono



-----邮件原件-----
发件人: lamikr [mailto:lamikr@cc.jyu.fi] 
发送时间: 2006年10月26日 7:30
收件人: Ningzhong Miao - 苗宁忠
抄送: linux-omap-open-source@linux.omap.com
主题: Re: A problem about tsc2101 omap audio alsa driver on H3 board


> The program died here, and earphone don’t have any sound.
>
> I have tried oss audio driver and 2.6.17 kernel. They are same.
>   
Hmm, aplayer has newer crashed for me.
Could you first try to change the playback target from speaker (default)
to headphone by using alsa-mixer to check whether you can then hear
something? If crash still happens, could you try to remove debug,
change again the target to headphone with alsa-mixer and try again with
aplay.

Mika

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

end of thread, other threads:[~2006-10-27  1:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-25 12:49 A problem about tsc2101 omap audio alsa driver on H3 board Ningzhong Miao - 苗宁忠
2006-10-25 23:29 ` lamikr
  -- strict thread matches above, loose matches on Subject: below --
2006-10-27  1:51 Ningzhong Miao - 苗宁忠

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