From: Angelo <s104259@yahoo•it>
To: "Pedro Luis D. L." <carcadiz@hotmail•com>
Cc: Linuxppc-embedded@ozlabs•org
Subject: RE: I2S driver
Date: Tue, 4 Mar 2008 17:38:53 +0100 (CET) [thread overview]
Message-ID: <538035.10329.qm@web23104.mail.ird.yahoo.com> (raw)
In-Reply-To: <BLU106-W3340DC3BF1A9FD27E9FCD3CA100@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]
Pedro wrote:
Ok, here down is the code I told you.
A few considerations before:
- As I told you, it is very bad commented, sorry. I'm still working on it.
- It's is not an alsa driver, but it copies data to the PSC working as SPI mode (it is not I2S but you only need to change the PSC configuration).
- Its purpose is to establish a dma task to copy the data from a buffer to the PSC, where I had attached a Digital to Analog Converter that into sound through a speaker.
- Data alignment is imposed by DAC requirements.
- Clock configuration is fixed to 44.1 Khz, so audio data must be sampled using that frequency. Data must be also mono (only one converter attached).
- This module is part of a mayor project to stream audio data through ethernet, so it provides a function to copy audio data to audio buffers. If there's no data to copy, it copies a null buffer to keep silence.
- What can you find useful in this code? Configuration steps to establish DMA Tasks and PSC configuration.
- After the module I send you also the code from another module that establishes PSC as I2S configuration. Clocks where adjusted to send the audio data also at 44.1 Khz as fine tunned as possible due to communication requirements of the attached DAC in that hardware.
And finally, here is the code:
#define SPI_DBG
#ifdef SPI_DBG
#define DBG(x...) printk("(debug) " x)
#else
#define DBG(x...)
#endif
#include
#include
#include
#include
#include
#include
.....
Thanks for code.
But why i can't see library?
>After the module I send you also the code from another module that >establishes PSC as I2S configuration. Clocks where adjusted to send >the audio data also at 44.1 Khz as fine tunned as possible due to >communication requirements of the attached DAC in that hardware.
You'll send me another code?
And what about my file lite5200b.dts?
I must enable some like this?
// PSC3 in CODEC mode example
//i2s@2400 { // PSC3
// device_type = "sound";
// compatible = "mpc5200b-psc-i2s";//not 5200 compatible
// cell-index = <2>;
// reg = <2400 100>;
// interrupts = <2 3 0>;
// interrupt-parent = <&mpc5200_pic>;
//};
---------------------------------
L'email della prossima generazione? Puoi averla con la Nuova Yahoo! Mail
[-- Attachment #2: Type: text/html, Size: 3206 bytes --]
next prev parent reply other threads:[~2008-03-04 16:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 10:26 I2S driver Angelo
2008-03-04 13:23 ` Pedro Luis D. L.
2008-03-04 16:38 ` Angelo [this message]
2008-03-05 10:09 ` Pedro Luis D. L.
2008-03-05 10:45 ` Angelo
2008-03-14 14:21 ` Angelo
-- strict thread matches above, loose matches on Subject: below --
2008-03-05 12:36 Pedro Luis D. L.
2008-03-06 10:27 ` Angelo
2008-03-06 13:41 ` Pedro Luis D. L.
2008-03-03 17:05 Angelo
2008-03-03 17:14 ` Phillip Lougher
2008-03-03 20:50 ` Timur Tabi
2008-03-03 13:18 i2s driver Angelo
2008-03-03 12:08 I2S driver Angelo
2008-03-03 12:40 ` Roman Fietze
2008-03-03 13:47 ` Mark Brown
2008-03-03 13:05 ` Pedro Luis D. L.
2008-03-03 22:06 ` Wolfgang Denk
2008-03-03 16:42 ` Timur Tabi
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=538035.10329.qm@web23104.mail.ird.yahoo.com \
--to=s104259@yahoo$(echo .)it \
--cc=Linuxppc-embedded@ozlabs$(echo .)org \
--cc=carcadiz@hotmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox