Hi John,
>
I have made custom audio cape using TLV320AIC3107 codec and here is a 
schematic diagram.  

<https://lh3.googleusercontent.com/-CxN1eNZnS_M/VBqJ2t5aMBI/AAAAAAAAAfA/1vLFnGnxNVU/s1600/audio%2Bcape.png>


My device tree is as follows :

/dts-v1/;

/plugin/;


/ {

compatible = "ti,beaglebone", "ti,beaglebone-black";

        /* identification */

part-number = "BB-BONE-AUDI-02";

version = "00A0", "A0";


/* state the resources this cape uses */

exclusive-use =

/* the pin header uses */

"P9.31", /* mcasp0: mcasp0_aclkx */

"P9.30", /* mcasp0: mcasp0_axr0 */

"P9.29", /* mcasp0: mcasp0_fsx */

"P9.28", /* mcasp0: mcasp0_axr2 */

"P9.25", /* mcasp0: mcasp0_ahclkx */

/* the hardware ip uses */

"mcasp0";


fragment@0 {

target = <&am33xx_pinmux>;

__overlay__ {


i2c2_pins: pinmux_i2c2_pins {

pinctrl-single,pins = <

0x150 0x72 /*spi0_scl.i2c2_sda,SLEWCTRL_SLOW | INPUT_PULLUP |MODE2*/

0x154 0x72 /*spi0_d0.i2c2_scl,SLEWCTRL_SLOW | INPUT_PULLUP | MODE2*/

>;

};


bone_audio_cape_audio_pins: pinmux_bone_audio_cape_audio_pins {

pinctrl-single,pins = <


0x1ac 0x20 /* mcasp0_ahclkx, INPUT | MODE0 */

0x19c 0x22 /* mcasp0_axr2, INPUT | MODE2 */

0x194 0x20 /* mcasp0_fsx, INPUT | MODE0 */

0x198 0x00 /* mcasp0_axr0, OUTPUT | MODE0 */

0x190 0x20 /* mcasp0_aclkx, INPUT | MODE0 */

>;

};

};

};



fragment@1 {

target = <&i2c2>;

__overlay__ {

#address-cells = <1>;

#size-cells = <0>;

clock-frequency = <100000>;

status = "okay";

pinctrl-names = "default";

pinctrl-0 = <&i2c2_pins>;



tlv320aic3007: tlv320aic3007@18 {

compatible = "ti,tlv320aic3007";

reg = <0x18>;

status = "okay";

};

};

};


fragment@2 {

target = <&mcasp0>;

__overlay__ {

pinctrl-names = "default";

pinctrl-0 = <&bone_audio_cape_audio_pins>;


status = "okay";


op-mode = <0>;          /* MCASP_IIS_MODE */

tdm-slots = <2>;

 num-serializer = <16>; 

serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */

     0 0 2 1 /* AXR0 AXR1 AXR2 AXR3 */

0 0 0 0

0 0 0 0

0 0 0 0 

>;

tx-num-evt = <1>;

rx-num-evt = <1>;

};

};


fragment@3 {

target = <&ocp>;

__overlay__ {

sound {

compatible = "ti,da830-evm-audio";

ti,model = "DA830 EVM";

ti,audio-codec = <&tlv320aic3007>;

ti,mcasp-controller = <&mcasp0>;

ti,codec-clock-rate = <12000000>;

ti,audio-routing =

"Headphone Jack",       "HPLOUT",

"Headphone Jack",       "HPROUT", 

"Line Out",             "LLOUT",

"Line Out",             "RLOUT",

"MIC3L",                "Mic Jack",

"MIC3R",                "Mic Jack",

"LINE1L",               "Line In",

"LINE2L",               "Line In",

"LINE1R",               "Line In",

"LINE2R",               "Line In";

};

};


};

};
I install DT and here is for confirmation :

in dmesg : 

[  254.659557] bone-capemgr bone_capemgr.8: part_number 'BB-BONE-AUDI-02', 
version 'N/A'
[  254.659641] bone-capemgr bone_capemgr.8: slot #7: generic override
[  254.659659] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at 
slot 7
[  254.659677] bone-capemgr bone_capemgr.8: slot #7: 'Override Board 
Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[  254.659784] bone-capemgr bone_capemgr.8: slot #7: Requesting part 
number/version based 'BB-BONE-AUDI-02-00A0.dtbo
[  254.659802] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware 
'BB-BONE-AUDI-02-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  254.668469] bone-capemgr bone_capemgr.8: slot #7: dtbo 
'BB-BONE-AUDI-02-00A0.dtbo' loaded; converting to live tree
[  254.668961] bone-capemgr bone_capemgr.8: slot #7: #4 overlays
[  254.678886] of_get_named_gpio_flags: can't parse gpios property
[  254.682895] 1-0018 supply IOVDD not found, using dummy regulator
[  254.682971] 1-0018 supply DVDD not found, using dummy regulator
[  254.683035] 1-0018 supply AVDD not found, using dummy regulator
[  254.683096] 1-0018 supply DRVDD not found, using dummy regulator
[  254.692524] davinci_evm sound.13:  tlv320aic3x-hifi <-> 48038000.mcasp 
mapping ok
[  254.701641] bone-capemgr bone_capemgr.8: slot #7: Applied #4 overlays.

 

root@beaglebone:~# cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0]   : control
 33:        : timer

root@beaglebone:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=EVM
    DA830 EVM, 
    Default Audio Device
sysdefault:CARD=EVM
    DA830 EVM, 
    Default Audio Device

root@beaglebone:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: EVM [DA830 EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Now I try to play wave file :

root@beaglebone:~/Desktop# aplay -vv test_stereo_8000Hz_8bit_PCM.wav 
Playing WAVE 'test_stereo_8000Hz_8bit_PCM.wav' : Unsigned 8 bit, Rate 8000 
Hz, Stereo
Plug PCM: Linear conversion PCM (S16_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 2
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 8
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
Slave: Hardware PCM card 0 'DA830 EVM' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 16
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
  appl_ptr     : 0
  hw_ptr       : 0
#######   +                                        | 19% 


after that board freezes and not responding.

When I check dmesg, I see the following error:

root@beaglebone:~/Desktop# dmesg

[  904.298073] omap_i2c 4819c000.i2c: Arbitration lost
[  905.330496] omap_i2c 4819c000.i2c: controller timed out

You have Idea, what's wrong ?

Please help me.
Thanks in Advance.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to