2009-01-11 07:38:44 Question: Play tone using AD73311L. Help Pls?
Tony Liu (CHINA)
Message: 67761
Dear all,
My platform information:
CPU: BF531
Codec: AD73311L
I build the kernel using:
Linux Kernel Configuration
Sound --->
[*] Sound card support
Advanced Linux Sound Architecture --->
[ ] OSS Sequencer API
[*] OSS Mixer API
[*] OSS PCM (digital audio) API
Codec configuration for releases 2008R1/1.5:
ALSA Blackfin devices --->
<*> AD73311L Audio support for BF53x
(0) Blackfin Audio SPORT port
(4) PF pin for AD73311L Chip Select
After system boot, command as below:
root: />mknod /dev/dsp c 14 3
root: /> tone
TONE: generating sine wave at 1000 Hz...
I don't hear something.
Test the AD73311L Pins:
SDIFS: Have waveform, Frame clock
SCLK: Have wavefrom, bit clock
SDI: No waveform
After some minutes system print:
ERROR: write(/dev/dsp) failed, errno=5
and tone exit.
Then check the interrupt status:
root: /> tone
TONE: generating sine wave at 1000 Hz...
ERROR: write(/dev/dsp) failed, errno=5
root: /> cat /proc/interrupts
6: 276093 BFIN Timer Tick
10: 0 SPORT error
16: 26 SPORT RX Data
17: 0 SPORT TX Data
21: 0 BFIN_UART_RX
22: 4540 BFIN_UART_TX
Err: 0
Why no SPORT TX data interrupt?
I lost some config?
Thank you!
I'v vist the :
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:ad73311
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:ad1836
But no idea.
QuoteReplyEditDelete
2009-01-11 08:19:22 Re: Question: Play tone using AD73311L. Help Pls?
Tony Liu (CHINA)
Message: 67762
Check booting information found this:
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
dma_alloc_init: dma_page @ 0x0184a000 - 256 pages at 0x01f00000
ALSA device list:
#0: Analog Devices AD73311L at PF4 SPORT0 rx/tx dma 1/2 err irq 10
Which reason cause DMA 1/2 err?
QuoteReplyEditDelete
2009-01-12 22:42:30 Re: Question: Play tone using AD73311L. Help Pls?
Cliff Cai (CHINA)
Message: 67840
1.It looks no data transmitting.Please check if you've selected correct pins for sport0 on your board.
2.#0: Analog Devices AD73311L at PF4 SPORT0 rx/tx dma 1/2 err irq 10
This is the correct information,it shows that SPORT0 is using irq 10 as error interrupt source.
Cliff
QuoteReplyEditDelete
2009-02-15 15:14:09 Re: Question: Play tone using AD73311L. Help Pls?
Rob Maris (GERMANY)
Message: 69465
I am having a quite comparable problem. Since the Blackfin is on a Bluetechnix TCM-BF537 module, I am using the trunk version of the distribution with the actual build tools (svn7688), where the make configure settings correspond to the proposal of the ad73311 docs page (I'm using PF7 for SE).
This is an excerpt of the boot log:
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ASoC version 0.13.2
dma rx:3 tx:4, err irq:45, regs:ffc00800
dma_alloc_init: dma_page @ 0x0161c000 - 256 pages at 0x01f00000
asoc: AD73311 <-> bf5xx-i2s mapping ok
ALSA device list:
#0: bf5xx_ad73311 (AD73311
Here is the output of the arecord -l command:
root: /> arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: bf5xxad73311 [bf5xx_ad73311], device 0: AD73311 AD73311-I2S-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
The circuit is exactly the same as with the Daughter Card of Analog Devices. Today I added the 22k resistor vrom DT0PRI to GND.
Neither does tone produce a tone, nor does it output an error. The audio amp has been verified to operate correctly.
QuoteReplyEditDelete
2009-02-16 14:56:40 Re: Question: Play tone using AD73311L. Help Pls?
Rob Maris (GERMANY)
Message: 69489
Below, a test using the sport_test program, as found in the docs section is transcripted.
However, another page (testing_the_linux_kernel) suggests that ALSA for SoC should not be enabled. I think this does not apply to newer distributions, since AD73311 is defined as a function of SoC.
root: /> sport_test -t sample.wav
Unable to request sport tx irq
root: /> sport_test -t sample.wav
Unable to request sport err irq
Hardware Trace:
0 Target : <0x00004628> { _dump_bfin_trace_buffer + 0x0 }
Source : <0x00006888> { _free_dma + 0x84 } CALL pcrel
1 Target : <0x00006888> { _free_dma + 0x84 }
Source : <0x00006822> { _free_dma + 0x1e } IF CC JUMP
2 Target : <0x00006804> { _free_dma + 0x0 }
Source : <0x0009bc64> { _sport_open + 0x80 } CALL pcrel
3 Target : <0x0009bc60> { _sport_open + 0x7c }
Source : <0x0009bcb6> { _sport_open + 0xd2 } JUMP.S
4 Target : <0x0009bcb6> { _sport_open + 0xd2 }
Source : <0x00038ab2> { _kfree + 0x62 } RTS
5 Target : <0x00038a50> { _kfree + 0x0 }
Source : <0x0002992c> { _free_irq + 0x7c } JUMP.L
6 Target : <0x00029924> { _free_irq + 0x74 }
Source : <0x00069bda> { _remove_proc_entry + 0x11a } RTS
7 Target : <0x00069bd4> { _remove_proc_entry + 0x114 }
Source : <0x00038ab2> { _kfree + 0x62 } RTS
8 Target : <0x00038a50> { _kfree + 0x0 }
Source : <0x00069ab2> { _free_proc_entry + 0x46 } JUMP.L
9 Target : <0x00069a9a> { _free_proc_entry + 0x2e }
Source : <0x00088b14> { _ida_remove + 0xf8 } RTS
10 Target : <0x00088a92> { _ida_remove + 0x76 }
Source : <0x00088a5c> { _ida_remove + 0x40 } IF !CC JUMP
11 Target : <0x00088a1c> { _ida_remove + 0x0 }
Source : <0x00069a96> { _free_proc_entry + 0x2a } CALL pcrel
12 Target : <0x00069a88> { _free_proc_entry + 0x1c }
Source : <0x00069a7e> { _free_proc_entry + 0x12 } IF !CC JUMP
13 Target : <0x00069a6c> { _free_proc_entry + 0x0 }
Source : <0x00069bd0> { _remove_proc_entry + 0x110 } CALL pcrel
14 Target : <0x00069b9c> { _remove_proc_entry + 0xdc }
Source : <0x00069be6> { _remove_proc_entry + 0x126 } JUMP.S
15 Target : <0x00069bdc> { _remove_proc_entry + 0x11c }
Source : <0x00069b98> { _remove_proc_entry + 0xd8 } IF !CC JUMP
BUG: failure at arch/blackfin/kernel/bfin_dma_5xx.c:180/free_dma()!
Kernel panic - not syncing: BUG!
The second command invocation yields the kernel panic. Can anyone give a useful hint what to do next?
QuoteReplyEditDelete
2009-02-16 17:04:34 Re: Question: Play tone using AD73311L. Help Pls?
Rob Maris (GERMANY)
Message: 69491
Finally I did some measurements.
SE goes high just at the moment that the boot process is recognizing the device;
SCLK measures approx. 2 MHz and disappears when SE is shorted to GND;
SDIFS measures appox. 8 kHz with < 10% duty cycle (pulses to high);
SDI shows irregular low frequency when "tone" is executed.
In the datasheet it is stated that a change from data mode into program mode must be issued by means of a RESET impulse. RESET, however, is directly coupled with CPU reset (but according to my investigation, this is also the case with the STAMP kit). Anything that I may have overlooked in this respect?
QuoteReplyEditDelete
2009-02-18 19:23:57 Re: Question: Play tone using AD73311L. Help Pls?
Rob Maris (GERMANY)
Message: 69588
I'm still much in trouble about the AD73311 functionality.
Examination of Stamp schematics (downloaded from the stamp537 project page - title "ADSP-BF537 EZ-KIT LITE") shows that 34 pin SPORT0 and SPORT1 connectors have pin 5 with processor RESET and pin 20 with "PF12_AUDIO_RESET". The latter has a name suggesting that this is the RESET for the codec. But this signal is also SPI_MISO, which makes it hardly suitable as an AUDIO_RESET.
Another application note (EE-96 Interfacing two AD73311 to ADSP-218x) makes use of a flip-flop to control RESET.
The schematic of the daughter board suggests that AD73311 RESET be connected to pin 5 of the connector.
I'd appreciate qualified hints, since my project is braked quite a bit now.
Rob
QuoteReplyEditDelete
2009-02-19 16:37:48 Re: Question: Play tone using AD73311L. Help Pls?
Rob Maris (GERMANY)
Message: 69656
Avdd1 had been connected solely to its associated capacitor, not to 3V3.
All (output) things works fine now.
BTW:
ad73311.h bug:
false: #define REGD_MUTE (x << 7)
correct: #define REGD_MUTE (1 << 7)
QuoteReplyEditDelete
2009-02-19 16:44:03 Re: Question: Play tone using AD73311L. Help Pls?
Mike Frysinger (UNITED STATES)
Message: 69658
thanks, fixed in svn now