element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 11 replies
  • Answers 2 answers
  • Subscribers 665 subscribers
  • Views 2293 views
  • Users 0 members are here
  • raspberry_pi
  • raspeberry_pi_accessories
Related

DarkIce: AlsaDspSource.cpp:265: Input/output error [0]

Former Member
Former Member over 11 years ago

Hi,

 

I try to build a streaming device with mij raspberry pi and wolfson audio card using darkice.

First i have installed the 2014-01-07-wheezy-raspbianW.zip image in the way

Leigh Davies had adviced. The next step i have installed darkice: Live mp3 streaming from audio-in with DarkIce and Icecast2 on Raspberry Pi

 

If i try to start darkice -c /etc/darkice.cfg i get the message after about 5 seconds: AlsaDspSource.cpp:265: Input/output error [0]

 

darkice.cfg:

 

# sample DarkIce configuration file, edit for your needs before using

# see the darkice.cfg man page for details

 

# this section describes general aspects of the live streaming session

[general]

duration        = 60        # duration of encoding, in seconds. 0 means forever

bufferSecs      = 5         # size of internal slip buffer, in seconds

reconnect       = yes       # reconnect to the server(s) if disconnected

 

# this section describes the audio input that will be streamed

[input]

device          = hw:0,0  # OSS DSP soundcard device for the audio input

sampleRate      = 44100     # sample rate in Hz. try 11025, 22050 or 44100

bitsPerSample   = 16        # bits per sample. try 16

channel         = 2         # channels. 1 = mono, 2 = stereo

 

 

# this section describes a streaming connection to an IceCast2 server

# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]

# these can be mixed with [icecast-x] and [shoutcast-x] sections

[icecast2-0]

bitrateMode     = abr       # average bit rate

format          = vorbis    # format of the stream: ogg vorbis

bitrate         = 96        # bitrate of the stream sent to the server

server          = www.double-u.nl        # host name of the server

port            = 8000      # port of the IceCast2 server, usually 8000

password        = *******  # source password to the IceCast2 server

mountPoint      = sample96  # mount point of this stream on the IceCast2 server

name            = DarkIce trial     # name of the stream

description     = This is only a trial     # description of the stream

url             = http://www.yourserver.com       # URL related to the stream

genre           = my own    # genre of the stream

 

Kind regardz, Wessel Overdijk

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Input/output error usually means that Darkice doesn't receive anything from the sound card.

    You have to run the appropriate Record_from... script first.

    I've found that an extra

    amixer -Dhw:0 cset name='AIF Playback Switch' on

    can be needed too.

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    unfortunately, the same error occured. Is it necessary to use an external power supply:

     

    sudo darkice -v9 -c /etc/darkice.cfg

    DarkIce 1.0 live audio streamer, http://code.google.com/p/darkice/

    Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/

    Copyright (c) 2008-2010, Akos Maroy and Rafael Diniz

    This is free software, and you are welcome to redistribute it

    under the terms of The GNU General Public License version 3 or

    any later version.

     

     

    Using config file: /etc/darkice.cfg

    01-Apr-2014 13:49:47 Using ALSA DSP input device: hw:0,0

    01-Apr-2014 13:49:47 encoding

    01-Apr-2014 13:49:47 scheduler high priority 99

    01-Apr-2014 13:49:47 Using POSIX real-time scheduling, priority 98

    01-Apr-2014 13:49:48 MultiThreadedConnector :: tranfer, bytes 10584000

    01-Apr-2014 13:49:48 MultiThreadedConnector :: ThreadData :: threadFunction, was (thread, priority, type):  0x1ecc318 98 SCHED_FIFO

    01-Apr-2014 13:49:48 MultiThreadedConnector :: ThreadData :: threadFunction, now is (thread, priority, type):  0x1ecc318 1 SCHED_FIFO

    DarkIce: AlsaDspSource.cpp:265: Input/output error [0]

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    You config file seems fine. I only changed the server name and  password and it streams just fine to my Icecast server.

    An external power supply should only be necessary if you want to use the speaker amplifier on the card.

     

    Which input is it you're trying to stream?

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    I'm trying to use the line-in.

     

    Kind regardz, Wessel.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Hmm...

    What is the output of these commands?

    amixer -Dhw:0 cget name='AIF1TX1 Input 1' | tail -1

    amixer -Dhw:0 cget name='AIF1TX2 Input 1' | tail -1

     

    They should return "values=11" and "values=12"

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Oeps, not good:

     

    amixer -Dhw:0 cget name='AIF1TX1 Input 1' | tail -1

    : values=0

    amixer -Dhw:0 cget name='AIF1TX2 Input 1' | tail -1

    : values=0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    No, not good image

    values=0 means Input=none

     

    That would indicate that the use case script Record_from_lineIn.sh has not been run.

    Run that script and check again. If you get 11 and 12, try to stream.

     

    These are the commands in the script:

    amixer -Dhw:0 cset name='IN3L Volume' 8

    amixer -Dhw:0 cset name='IN3R Volume' 8
    amixer -Dhw:0 cset name='IN3 High Performance Switch' on

    amixer -Dhw:0 cset name='IN3L Digital Volume' 128

    amixer -Dhw:0 cset name='IN3R Digital Volume' 128

    amixer -Dhw:0 cset name='AIF1TX1 Input 1' IN3L

    amixer -Dhw:0 cset name='AIF1TX1 Input 1 Volume' 32

    amixer -Dhw:0 cset name='AIF1TX2 Input 1' IN3R

    amixer -Dhw:0 cset name='AIF1TX2 Input 1 Volume' 32

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    Thanks a lot Ragnar, that was the missing part! image

     

    Greetings, Wessel Overdijk

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • benip
    0 benip over 7 years ago in reply to Former Member
    Hello, I have this error message 
    after setting up my hifiberry digi+ i/o board with darkice and a PI3:


    Using config file: /etc/darkice.cfg
    Using ALSA DSP input device: plughw:0,0
    Using POSIX real-time scheduling, priority 4
    Using aacplus codec
    DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
    what does it mean?  How to solve the problem ?
    I followed this configuration 
    for the install of the hifiberry board:

    sudo nano /boot/config.txt

    dtoverlay = hifiberry-digi

    # Enable audio (loads snd_bcm2835)
    dtoverlay=hifiberry-digi

    after restart, i have :

    **** Liste des Périphériques Matériels PLAYBACK ****
    carte 0: sndrpihifiberry [snd_rpi_hifiberry_digi], périphérique 0: HifiBerry Digi HiFi wm8804-spdif-0 []
    Sous-périphériques: 1/1
    Sous-périphérique #0: subdevice #0

    sudo nano /etc/asound.conf

    pcm.!default {
    type hw card 0
    }
    ctl.!default {
    type hw card 0
    }


    My config with darkice is :

    # this section describes general aspects of the live streaming session
    [general]
    duration = 0 # duration of encoding, in seconds. 0 means forever
    bufferSecs = 5 # size of internal slip buffer, in seconds
    reconnect = yes # reconnect to the server(s) if disconnected

    # this section describes the audio input that will be streamed
    [input]
    # device = /dev/dsp # OSS DSP soundcard device for the audio input
    device = plughw:0,0 # OSS DSP soundcard device for the audio input
    sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100
    bitsPerSample = 16 # bits per sample. try 16
    channel = 2 # channels. 1 = mono, 2 = stereo


    # this section describes a streaming connection to a ShoutCast server
    # there may be up to 8 of these sections, named [shoutcast-0] ... [shoutcast-7]
    # these can be mixed with [icecast-x] and [icecast2-x] sections
    [shoutcast-0]
    bitrateMode = vbr # average bit rate
    format = mp3 # format of the stream: ogg vorbis
    bitrate = 88 # bitrate of the stream sent to the server
    quality = 0.5 # encoding quality
    server = myip
    # host name of the server
    port = myport # source port of the ShoutCast server, usually 8001
    password = mypass # source password to the ShoutCast server
    name =  test darkice
    # name of the stream
    url = http://www.yourserver.com
    # URL related to the stream
    genre = my own # genre of the stream
    public = no # advertise this stream?
    irc = irc.yourserver.com
    # IRC info related to the stream
    aim = aim here # AIM info related to the stream
    icq = I see you too
    # ICQ info related to the stream

    Thanks for your answer

    best regards

    Ben

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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 © 2025 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.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube