element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog BBB - Building a DAC
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 6 Jul 2013 7:19 PM Date Created
  • Views 16739 views
  • Likes 8 likes
  • Comments 126 comments
  • onsemi
  • audio
  • dac
  • bbb
  • texas_instruments
  • bb_black
  • beagle_bone_black
  • ti
Related
Recommended

BBB - Building a DAC

shabaz
shabaz
6 Jul 2013

Introduction

This project was about getting audio out of the BeagleBone Black. The aim was to have stereo audio, at least as good as an iPod. See further below for the circuit, and also a video showing it working.

Later, this project was used to build a PCB design (see below for the link to this part 2, and then the PCB was used to make a home Sonos-type hi-fi audio player (see the link to part 3 below).

 

The BBB has an on-board I2S interface, which makes interfacing an external DAC easy. The I2S interface is connected from the AM3359 processor to the HDMI chip (TDA19988) but it is not required for HDMI to be used in order to make use of the I2S interface. The I2S interface is brought out to some pins on port P9 (see here for details). It was encouraging that Technoshaman and Donald Miller had some success with the interface, so I wanted to try it out and I got some time today.

 

Part 2 to this post, which implements the prototype, can be found by clicking here.

image

Part 3 implements a complete design in an enclosure for a Sonos-like solution.

image

See Creating an Internet Radio for a complete project by the EAGLE team including board layouts

image

 

Parts Selection

Since the interface is capable of 24-bit/192kHz audio, it was worthwhile picking a nice DAC. A good but not over-the-top device seemed to be the Texas Instrument's PCM5101 which is nice because it has reasonable specs and also provides a built-in charge pump so that it can function from a single supply. A headphone amp was connected, and this was ON Semi's NCP2811A. The combination of PCM5101 (actually my prototype used PCM5101A which can also function from 1.8V, but this was not needed)  and NCP2811A was chosen so that the entire circuit could operate from the BBB supply if desired, even if it was from a Li-Ion battery that was powering the BBB, and for low noise and distortion. The only problem is that the PCM5101 has quite a high output (clearly a good thing!) but the audio amp minimum recommended gain is 1 and it cannot meet the required output voltage, and it means that it will distort at high volume. So, at a lower volume (and lower SNR) it will be fine, and I prefer this particular amp because of the very low distortion. The ON semi datasheet was sparse though.

 

Building It

This is the DAC prototype:

image

This is the whole thing connected up:

image

This is the rear of the board - a bit messier! It was built on a SMD to DIP adapter board with some copper tape for supply rails:

image

This is the audio amp - not a lot to it, since it is so integrated.

image

 

Testing It

I made a recording, but excuse the quality. The audio is from a small 64 ohm speaker picked up by a simple camera in-built microphone so it sounds bad, but connecting to headphones is a different story - it sounds as good as an ipod (although this is subjective - I don't have a way to measure). Another thing I still need to check is that originally I thought the data was read on the falling edge of the bitclock on the BBB, but I2S specifies the opposite. Maybe I made a mistake in my initial observations (I have not had a chance to re-check), or maybe it changed in a build. But the circuit as shown here works for me.

 

This is running on an not-recent Angstrom downloaded build (maybe a few weeks old image), and I still hear some very slight audio issues - it sounds like perhaps a break for a few tens of milliseconds occasionally, only if you're listening closely. I really hope it is resolved in a build soon (or maybe it is due to ffmpeg - perhaps avconv gives better results).

EDIT: I've since been using mplayer (command line is mplayer -ao alsa -volume 4 AmyWinehouse-BackToBlack.mp3  and either I'm not noticing any audio issues or they have disappeared). I've concluded it sounds at least as capable as my old ipod touch, maybe better).

 

I played audio using the command line:

ffmpeg -i AmyWinehouse-YouKnowImNoGood.mp3 -f alsa "default:CARD=Black" -re -vol 150

and it reported the stream as:

Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s

 

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Circuit Diagram

This is the circuit. All the 3.3V supplies were connected together for the prototype (I wouldn't do that for real, although it sounded very good in my limited tests). The amplifier V+ can be connected to 3.3V or the 5V supply (or the Li-Ion battery directly).

Note 16th Jan 2014: See the comments section below for more detail; the SCK pin on the PCM5101A was disconnected from 0V and instead connected to the BBB P9 pin 25. This will provide the lowest jitter by disabling the DAC's internal PLL. A sample capture of the audio quality (captured from the headphone output of the NCP2811A, just to give an approximate idea of what it sounds like from headphones) is attached to the post below, in the zip file dac-output.zip. More info on it in the comments section below.

Note 2: Please add a logic inverter to the bitclock connection. For more detail, see the comments below (search for the word 'bitclock' to make it easier to find). See the part 2 blog post, and the attached file there called dac-documentation.zip for the circuit diagram, showing the bitclock inversion. More recent BBB images may not need it, but it was certainly needed for the images I tested with.

image

 

Experiments with FLAC

I've also tried a FLAC file, but I'm hitting some limitation with ffmpeg it seems, and it picks a 16-bit format when it ought to be 24-bit. Meanwhile, avconv I couldn't get to work for MP3 or FLAC (it reported 'av_interleaved_write_frame(): Resource temporarily unavailable'). If anyone knows, any tips on how to play FLAC at 24-bit would be gratefully appreciated.

 

root@beaglebone:~# ffmpeg -i Taxman_2009_Digital_Remaster.flac -f alsa "default:CARD=Black" -re -vol 5
ffmpeg version v0.8.4, Copyright (c) 2000-2012 the Libav developers
  built on May 20 2013 13:00:42 with gcc 4.7.3 20130205 (prerelease)
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
[flac @ 0x2da80] max_analyze_duration reached
Input #0, flac, from 'Taxman_2009_Digital_Remaster.flac':
  Metadata:
    ORIGREFERENCE   : 6C05C9F79EE74052A7991B9669B98533
    ORIGDATE        : 2009:09:14
    ORIGTIME        : 11:57:01
    TIMEREFERENCE   : 5292000
    CODINGHISTORY   : A=PCM,F=44100,W=24,M=stereo,T=SADiE5
    ORGANIZATION    : EMI
    TITLE           : Taxman
    track           : 1
    ARTIST          : The Beatles
    ALBUM           : Revolver (24 BIT Remastered)
    DATE            : 2009
  Duration: 00:02:37.85, bitrate: 1892 kb/s
    Stream #0.0: Audio: flac, 44100 Hz, 2 channels, s32
Incompatible sample format 's32' for codec 'pcm_s16le', auto-selecting format 's16'
Output #0, alsa, to 'default:CARD=Black':
  Metadata:
    ORIGREFERENCE   : 6C05C9F79EE74052A7991B9669B98533
    ORIGDATE        : 2009:09:14
    ORIGTIME        : 11:57:01
    TIMEREFERENCE   : 5292000
    CODINGHISTORY   : A=PCM,F=44100,W=24,M=stereo,T=SADiE5
    ORGANIZATION    : EMI
    TITLE           : Taxman
    track           : 1
    ARTIST          : The Beatles
    ALBUM           : Revolver (24 BIT Remastered)
    DATE            : 2009
    encoder         : Lavf53.21.0
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
  Stream #0.0 -> #0.0

Attachments:
dac-output.zip
  • Sign in to reply

Top Comments

  • e14 Contributor
    e14 Contributor over 12 years ago in reply to e14 Contributor +2
    Current test rig. BBB ($45), cs4271 on breadboard (about $15 parts and dozens of hours of labor), Cary Audio SE-1 amp (about $1K), pair of B&W DM302 speakers (about $200). I assembled this system that…
  • shabaz
    shabaz over 8 years ago in reply to shabaz +2
    Also, unrelated, but for after you have resolved the device tree issue, I just wanted to confirm, if you're following the circuit, make sure you include the 'bitclock inversion' functionality. The BBB…
  • shabaz
    shabaz over 8 years ago in reply to jithu_element14 +2
    Hi Jithu, Just to follow up on this, I re-tried on another image too, but still no luck. I've posted a request for help on the Beagleboard.org BBB-Wireless forum, in case anyone else has had success. Reproducing…
  • e14 Contributor
    e14 Contributor over 12 years ago in reply to shabaz

    You're right about the bitclock. When I got around to playing something loud enough such that the next-to-MSB bit was toggled, I got a horrible clipping sound. But after preprocessing divide-by-two, the sound was fine again. Clearly the DAC is skipping the MSB and starting each sample at MSB-1. My effort now is to get the cs4271 driver into the audio device. Compiling that driver into the kernel is done, but I cannot seem to get the audio device to actually use it.

     

    I stripped out the audio parts of the HDMI driver and made an overlay "jsr-nxptda-00A0.dts", which works fine. I then changed all occurrences of "nxptda" to "cs4271" to make overlay "jsr-nxp-cs4271-00A0.dts", which didn't work. Shabaz, do you have a clue why this doesn't work? What is a good forum for asking for help to analyze this problem?

     

    I get the following in dmesg.

     

    [   53.048573] bone-capemgr bone_capemgr.9: part_number 'jsr-nxp-cs4271', version 'N/A'
    [   53.048658] bone-capemgr bone_capemgr.9: slot #7: generic override
    [   53.048677] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7
    [   53.048695] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,jsr-nxp-cs4271'
    [   53.048790] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'jsr-nxp-cs4271-00A0.dtbo
    [   53.048809] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'jsr-nxp-cs4271-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
    [   53.056885] bone-capemgr bone_capemgr.9: slot #7: dtbo 'jsr-nxp-cs4271-00A0.dtbo' loaded; converting to live tree
    [   53.057226] bone-capemgr bone_capemgr.9: slot #7: #4 overlays
    [   53.066632] of_get_named_gpio_flags exited with status 59
    [   53.066754] davinci_evm sound.13: ASoC: CODEC (null) not registered
    [   53.091510] davinci_evm sound.13: snd_soc_register_card failed (-517)
    [   53.111693] platform sound.13: Driver davinci_evm requests probe deferral
    [   53.111768] bone-capemgr bone_capemgr.9: slot #7: Applied #4 overlays.

     

    Here's the result of loading jsr-nxptda instead:

     

    [   38.768711] bone-capemgr bone_capemgr.9: part_number 'jsr-nxptda', version 'N/A'
    [   38.768797] bone-capemgr bone_capemgr.9: slot #7: generic override
    [   38.768816] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7
    [   38.768834] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,jsr-nxptda'
    [   38.768931] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'jsr-nxptda-00A0.dtbo
    [   38.768950] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'jsr-nxptda-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
    [   38.783468] bone-capemgr bone_capemgr.9: slot #7: dtbo 'jsr-nxptda-00A0.dtbo' loaded; converting to live tree
    [   38.783813] bone-capemgr bone_capemgr.9: slot #7: #4 overlays
    [   38.791768] of_get_named_gpio_flags exited with status 59
    [   38.797033] davinci_evm sound.13:  nxp-hdmi-hifi <-> 48038000.mcasp mapping ok
    [   38.802958] bone-capemgr bone_capemgr.9: slot #7: Applied #4 overlays.

     

     

    Clearly, the cs4271 driver is in my modified kernel, as shown by grep cs4271 /boot/System.map-3.8.13-bone36:

     

    c038cee0 t cs4271_spi_remove
    c038ceea t cs4271_i2c_remove
    c038cef6 t cs4271_digital_mute
    c038cf2a t cs4271_soc_suspend
    c038cf3e t cs4271_set_dai_sysclk
    c038cf52 t cs4271_get_deemph
    c038cf66 t cs4271_set_deemph
    c038cfcc t cs4271_hw_params
    c038d070 t cs4271_put_deemph
    c038d090 t cs4271_set_dai_fmt
    c038d118 t cs4271_remove
    c038d130 t cs4271_probe
    c038d25c t cs4271_spi_probe
    c038d294 t cs4271_i2c_probe
    c038d2d0 t cs4271_soc_resume
    c04e3e18 r cs4271_deemph
    c04e3e28 r cs4271_clk_tab
    c04e3ecc r cs4271_dt_ids
    c04e4054 r cs4271_snd_controls
    c04e4324 r cs4271_i2c_id
    c04e4354 r cs4271_dflt_reg
    c04e435c r cs4271_dai_ops
    c085c56c t cs4271_modinit
    c08628ec t cs4271_modexit
    c0876ec0 t __initcall_cs4271_modinit6
    c08fdf18 d cs4271_i2c_driver
    c08fdf90 d cs4271_spi_driver
    c08fdfe4 d soc_codec_dev_cs4271
    c08fe060 d cs4271_dai
    c08fe0e8 d cs4271_dac_tlv

     

    Contents of jsr-nxptda-00A0.dts:

     

    /*
    * Copyright (C) 2014 John Rhoades
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */
    /dts-v1/;
    /plugin/;

     

    / {
        compatible = "ti,beaglebone-black";
        part-number = "jsr-nxptda";
        version = "00A0";

     

        /* state the resources this cape uses */
        exclusive-use =
            /* the pin header uses */
            "P9.25",    /* mcasp0: mcasp0_ahclkx */
            "P9.28",    /* mcasp0: mcasp0_axr2 */
            "P9.29",    /* mcasp0: mcasp0_fsx */
            "P9.31",    /* mcasp0: mcasp0_aclkx */
            /* the hardware IP uses */
            "gpio1_27",
            "mcasp0";

     

        fragment@0 {
            target = <&am33xx_pinmux>;
            __overlay__ {
                nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
                    pinctrl-single,pins = <
                        0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
                    >;
                };

     

                mcasp0_pins: mcasp0_pins {
                    pinctrl-single,pins = <
                        0x1ac 0x30      /* mcasp0_ahclkx,       MODE0 | INPUT */
                        0x19c 0x02    /* mcasp0_ahclkr, */
                        0x194 0x10      /* mcasp0_fsx,         MODE0 | OUTPUT  */
                        0x190 0x00      /* mcasp0_aclkr.mcasp0_aclkx,     MODE0 | OUTPUT_PULLDOWN */
                        0x1a8 0x1f    /* mcasp0_axr1 GPIO1_27 | OUTPUT | PULLUP */
                    >;
                };
            };
        };

     

        fragment@2 {
            target = <&ocp>;
            __overlay__ {

     

                /* avoid stupid warning */
                #address-cells = <1>;
                #size-cells = <1>;

     

                nxptda: nxptda@0 {
                       compatible = "nxp,nxptda";
                       status = "okay";
                };

            };
        };

     

        fragment@3 {
            target = <&mcasp0>;
            __overlay__ {
                pinctrl-names = "default";
                pinctrl-0 = <&mcasp0_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 1 0
                    0 0 0 0
                    0 0 0 0
                    0 0 0 0
                >;
                tx-num-evt = <1>;
                rx-num-evt = <1>;
            };
        };

     

        fragment@4 {
            target = <&ocp>;
            __overlay__ {
                sound {
                    compatible = "ti,am33xx-beaglebone-black";
                    ti,model = "nxptda";
                    ti,audio-codec = <&nxptda>;
                    ti,mcasp-controller = <&mcasp0>;
                    ti,codec-clock-rate = <2457600>;
                    mcasp_clock_enable = <&gpio2 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
                };
            };

        };

    };

     

    Contents of jsr-nxp-cs4271-00A0.dts:

    /*
    * Copyright (C) 2014 John Rhoades
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */
    /dts-v1/;
    /plugin/;

     

    / {
        compatible = "ti,beaglebone-black";
        part-number = "jsr-nxp-cs4271";
        version = "00A0";

     

        /* state the resources this cape uses */
        exclusive-use =
            /* the pin header uses */
            "P9.25",    /* mcasp0: mcasp0_ahclkx */
            "P9.28",    /* mcasp0: mcasp0_axr2 */
            "P9.29",    /* mcasp0: mcasp0_fsx */
            "P9.31",    /* mcasp0: mcasp0_aclkx */
            /* the hardware IP uses */
            "gpio1_27",
            "mcasp0";

     

        fragment@0 {
            target = <&am33xx_pinmux>;
            __overlay__ {
                nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
                    pinctrl-single,pins = <
                        0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
                    >;
                };

     

                mcasp0_pins: mcasp0_pins {
                    pinctrl-single,pins = <
                        0x1ac 0x30      /* mcasp0_ahclkx,       MODE0 | INPUT */
                        0x19c 0x02    /* mcasp0_ahclkr, */
                        0x194 0x10      /* mcasp0_fsx,         MODE0 | OUTPUT  */
                        0x190 0x00      /* mcasp0_aclkr.mcasp0_aclkx,     MODE0 | OUTPUT_PULLDOWN */
                        0x1a8 0x1f    /* mcasp0_axr1 GPIO1_27 | OUTPUT | PULLUP */
                    >;
                };
            };
        };

     

        fragment@2 {
            target = <&ocp>;
            __overlay__ {

     

                /* avoid stupid warning */
                #address-cells = <1>;
                #size-cells = <1>;

     

                cs4271: cs4271@0 {
                       compatible = "nxp,cs4271";
                       status = "okay";
                };

            };
        };

     

        fragment@3 {
            target = <&mcasp0>;
            __overlay__ {
                pinctrl-names = "default";
                pinctrl-0 = <&mcasp0_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 1 0
                    0 0 0 0
                    0 0 0 0
                    0 0 0 0
                >;
                tx-num-evt = <1>;
                rx-num-evt = <1>;
            };
        };

     

        fragment@4 {
            target = <&ocp>;
            __overlay__ {
                sound {
                    compatible = "ti,am33xx-beaglebone-black";
                    ti,model = "cs4271";
                    ti,audio-codec = <&cs4271>;
                    ti,mcasp-controller = <&mcasp0>;
                    ti,codec-clock-rate = <2457600>;
                    mcasp_clock_enable = <&gpio2 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
                };
            };
        };
    };

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to e14 Contributor

    Hi John,

     

    120 degree F(48 degrees Celsius) is possibly about right for that IC (half a watt would be noticeable heat from a TSSOP device).

     

    Regarding sound issues, as you say, perhaps breadboard and power supply may be causing issues with the CS4271.

     

    For the dac_output.zip recording (different IC, very different use-case but perhaps it helps as some vague reference) attached to the post, this was my (bad) layout:

    5V PSU (switchmode brick)--->BBB playing MP3 file--->DAC-->headphone amp-->Analog line input on PC sound card-->Record to MP3 (dac_output.mp3).

     

    This is default 16-bit 48k (at least on the ancient Angstrom build I'm got on my BBB) btw, and probably needs driver configuration or maybe modification to change to different settings.

     

    By the way, one thing to be wary about (I couldn't see it on the photo) is that you may need an inverter on the bitclock until someone corrects it in the driver (maybe this is already the case, but I'm not sure - not downloaded a recent build in a while). It is discussed in some comments above for the detail.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 12 years ago in reply to shabaz

    Yes indeed. I now have a little working prototype using a CS4271 chip (Cirrus) and I'm using the master clock signal from P9.25. Here's a pic of the prototype:

    image

    The metal rod coming from a lump of clay on top of the cs4271 is a thermometer probe, which indicates the chip temperature is about 120 deg. F. I'm surprised it runs that hot. According to the spec, it takes a max of 1/2 watt of power. Maybe 1/2 a watt is enough to heat up this tiny chip. Or maybe I've damaged the chip with my clumsy soldering technique--need to measure what the current draw actually is.  The circuit diagram is essentially the one shown in the PDF for the codec chip (http://www.cirrus.com/en/pubs/proDatasheet/CS4271_F1.pdf). The small chip on the left is an OPA2134 audio op amp.

     

    The sound quality is quite good. I hooked up the cs4271 output to my hifi and listened carefully to some music, then listened to the same song played directly from the digital source file on the hifi system. There was a little bit of background grunginess from the cs4271 that was absent in the direct digitial playback. This could only be heard on the quietest passages. I expect this is the result of taking power directly off the Beaglebone header pins (a good separate power supply for the analog part of the chip should fix this), as well as the rather poor layout on a proto board instead of a proper printed circuit with a good ground plane.

     

    Next step is to write a .dts that uses the cs4271 codec driver instead of piggybacking off the HDMI audio device, and hook up the I2C interface. At present I've strapped the chip to be in stand-alone mode, which hides much of the capabilities.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • morgaine
    morgaine over 12 years ago in reply to e14 Contributor

    Regarding TI, I don't think it puts us on the moral high ground to regularly highlight the merits of open documentation and the benefits of open source to manufacturers, and then when they fully document a PRU, to complain that they aren't showing support commitment.  TI has done its part.  I think supporting the PRUs for many decades ahead is our job, not TI's.

     

    Our existing BBBs aren't going to magically vanish just because PRU is not in OMAP5, so it's a facility that deserves our support.  It's a long-term relationship. image

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 12 years ago in reply to morgaine

    Morgaine Dinova wrote:

    your product will be more or less identical to that of everyone else, ie. no product differentiation.

    Sounds like the PC image  There's also some argument that says that with some standardisation you get economies of scale.

    are the PRUs available in that "Long-Term-Support" AM335x that Olimex want to use in a future industrial OLinuXino because TI guarantees (from memory) 10-year availability for the part?

    long term availability is of course a good thing, but I wonder what product could remain on sale essentially the same for 10 years without encountering problems due to newer, faster, more capable, (more shiny image ) alternatives arriving later.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube