11 Replies Latest reply on Jul 29, 2018 3:32 PM by benip

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

    woverdijk

      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

        • Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
          ragnar.jensen

          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

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

              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]

                • Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                  ragnar.jensen

                  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

                  1 of 1 people found this helpful
                    • Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                      woverdijk

                      I'm trying to use the line-in.

                       

                      Kind regardz, Wessel.

                        • Re: Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                          ragnar.jensen

                          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

                          1 of 1 people found this helpful
                            • Re: Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                              woverdijk

                              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

                                • Re: Re: Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                                  ragnar.jensen

                                  No, not good

                                  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

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

                                      Thanks a lot Ragnar, that was the missing part!

                                       

                                      Greetings, Wessel Overdijk

                                          • Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                                            benip
                                            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

                          • Re: DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
                            benip
                            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