All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Mandarino <fmandarino@endrelia.com>
To: Paul Kavan <pkavan@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: at91 SoC Modifications
Date: Mon, 25 Jun 2007 16:32:37 -0400	[thread overview]
Message-ID: <46802665.4080605@endrelia.com> (raw)
In-Reply-To: <61c0054e0706251309lf60afabi86ab192e10a0635@mail.gmail.com>

Paul Kavan wrote:
> Hello all:
> 
> I have been struggling to determine why the sync line (TF0) behaves so
> strangely when in capture mode yet acts fine in playback mode. So far, no
> real clues. However, I do have a few questions. I have DATADEF set for TD0
> set to 1. However, at the end of a playback it pulls to zero. Any clue why
> this might be happening?

Perhaps it is due to the SSC being reset when the playback channel is
closed?

> Also, in the machine code, I set up some test code to printk back the gpio
> registers:
> 
> the code for the gpio is given as
> 
> #define AT91_PIO_TK0    (1 << (AT91_PIN_PB16 - PIN_BASE) % 32)
> #define AT91_PIO_TF0    (1 << (AT91_PIN_PB17 - PIN_BASE) % 32)
> #define AT91_PIO_TD0    (1 << (AT91_PIN_PB18 - PIN_BASE) % 32)
> #define AT91_PIO_RD0    (1 << (AT91_PIN_PB19 - PIN_BASE) % 32)
> #define AT91_PIO_RK0    (1 << (AT91_PIN_PB20 - PIN_BASE) % 32)
> #define AT91_PIO_RF0    (1 << (AT91_PIN_PB21 - PIN_BASE) % 32)
> .
> .
> .
>    ssc_pio_lines = AT91_PIO_TF0 | AT91_PIO_TK0 | AT91_PIO_TD0
>            | AT91_PIO_RD0 /*| AT91_PIO_RK0 | AT91_PIO_RF0*/ ;
> 
>        printk("SSC PIO LINES is 0x%x\n",ssc_pio_lines);
>    /* Reset all PIO registers and assign lines to peripheral A */
>     at91_sys_write(AT91_PIOB + PIO_PDR,  ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_ODR,  ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_IFDR, ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_CODR, ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_IDR,  ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_MDDR, ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_PUDR, ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_ASR,  ssc_pio_lines);
>     at91_sys_write(AT91_PIOB + PIO_OWDR, ssc_pio_lines);
> 
>        /*TEST CODE*/
>        printk("PIOB-PDR is set to %d\n",at91_sys_read(AT91_PIOB +
> PIO_PDR));
>     printk("PIOB-ODR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_ODR));
>     printk("PIOB-IFDR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_IFDR));
>     printk("PIOB-CODR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_CODR));
>     printk("PIOB-IRD is set to %d\n",at91_sys_read(AT91_PIOB + PIO_IDR));
>     printk("PIOB-MDDR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_MDDR));
>     printk("PIOB-PUDR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_PUDR));
>     printk("PIOB-ASR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_ASR));
>     printk("PIOB-OWDR is set to %d\n",at91_sys_read(AT91_PIOB + PIO_OWDR));
>        /*END OF TEST CODE*/
> 
> 
> and the result at boot is:
> 
> AT91SAM9260EK W6811 Driver <1>
> w6811: W6811 PCM SoC Audio 0.1
> asoc: W6811 <-> at91-ssc0 mapping ok
> SSC PIO LINES is 0xf0000
> PIOB-PDR is set to 0
> PIOB-ODR is set to 0
> PIOB-IFDR is set to 0
> PIOB-CODR is set to 0
> PIOB-IRD is set to 0
> PIOB-MDDR is set to 0
> PIOB-PUDR is set to 0
> PIOB-ASR is set to 0
> PIOB-OWDR is set to 0
> 
> ...why are all the registers set to 0?

These registers are all write-only registers.  You have to read their
corresponding status registers to see what values are set.

../fam
-- 
Frank Mandarino                                fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada

  reply	other threads:[~2007-06-25 20:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 21:21 at91 SoC Modifications Paul Kavan
2007-06-20 21:46 ` Paul Kavan
2007-06-21 12:07   ` Liam Girdwood
2007-06-21 14:47 ` Paul Kavan
2007-06-21 19:10   ` Paul Kavan
2007-06-21 20:32     ` Paul Kavan
2007-06-21 21:26     ` Liam Girdwood
2007-06-22 15:53   ` Paul Kavan
2007-06-22 16:49     ` Frank Mandarino
2007-06-22 17:23       ` Paul Kavan
2007-06-22 19:00         ` Frank Mandarino
2007-06-25 20:09 ` Paul Kavan
2007-06-25 20:32   ` Frank Mandarino [this message]
2007-06-25 20:45     ` Paul Kavan
2007-06-25 20:47   ` Paul Kavan
2007-06-25 21:51     ` Paul Kavan
2007-06-25 22:43       ` Liam Girdwood
2007-06-26 11:53       ` Frank Mandarino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46802665.4080605@endrelia.com \
    --to=fmandarino@endrelia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=pkavan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.