Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0 A +

Raspberry Pi related support

Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0 A +

Postby G*3AS@MCrD%8^np$b9fk » 10 Mar 2016, 17:09

Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0 A +
I2S driver : Hifiberry (volumio)
Advanced Power Management Script.
http://forum.audiophonics.fr/viewtopic.php?f=4&t=1578
i ordered this dac (on its way).
is it possible to use this script with rune audio?
(like it more than volumio)
if so, how?
thanks
ww
G*3AS@MCrD%8^np$b9fk
 
Posts: 4
Joined: 20 Mar 2015, 12:29

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby otec » 10 Mar 2016, 18:09

Yes. I have V2 and it works perfectly fine.

Sent from my Nexus 6P using Tapatalk
otec
 
Posts: 14
Joined: 03 Feb 2016, 22:27

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby hondagx35 » 10 Mar 2016, 18:24

Hi,

the question was:
is it possible to use this script with rune audio?

No they won't.

You can do something similar with RuneAudio by modifying the RuneAudio shutdown script.
https://github.com/RuneAudio/RuneUI/blo ... e_shutdown

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby G*3AS@MCrD%8^np$b9fk » 10 Mar 2016, 21:13

thanks for the quick reply.
G*3AS@MCrD%8^np$b9fk
 
Posts: 4
Joined: 20 Mar 2015, 12:29

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby G*3AS@MCrD%8^np$b9fk » 16 Mar 2016, 22:18

just an update. I have received the dac. works fine. the script is not really needed. the possibility to use a powerbutton is a great thing (no need to pull/plug the usb cable). if someone is looking for a i2s dac - i recommend it (i am not affiliated to audiophonics.fr).
G*3AS@MCrD%8^np$b9fk
 
Posts: 4
Joined: 20 Mar 2015, 12:29

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby Baldgreene » 26 Mar 2016, 23:22

Dear all,

Having this DAC and a RPI 3 (they work fine together), I have tried to enable the power management feature of the board.

Starting from the audiophonics scripts, I managed to monitor the hardware power switch through a systemd service, as described here. Power Down from the GUI was properly taken into account by adding the GPIO shutdown sequence at the the RuneAudio shutdown script, as suggested by Frank. Consequently I am now able to drive a clean power off from both the hardware switch and the GUI.

However it seems that /var/www/command/rune_shutdown is also called when "Reboot" is selected from the GUI. As a result, the power is switched off by the DAC board during the rebooting process since the GPIO pins have been improperly set as for a power down.

I wonder if there would be a way to discriminate between GUI-selected "Power Off" and "Reboot", either within the rune_shutdown script or by adding a new script that would be solely reboot-trigerred. Any suggestion would be more than welcome.

Best regard,

Lionel
User avatar
Baldgreene
 
Posts: 6
Joined: 26 Mar 2016, 21:26
Location: France

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby hondagx35 » 27 Mar 2016, 00:49

Hi Lionel,

I wonder if there would be a way to discriminate between GUI-selected "Power Off" and "Reboot", either within the rune_shutdown script

Please update your installation:
Code: Select all
cp /srv/http/command/rune_shutdown /srv/http/command/rune_shutdown.old
cd /srv/http
git stash
git pull


Now you can distinguish between reboot and shutdown.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby Baldgreene » 27 Mar 2016, 02:04

Hi Frank,

Many thanks for the quick answer and for the simple yet efficient solution. The whole power management system now works flawlessly (hardware shutdown, GUI shutdown and GUI reboot)!

Lionel
User avatar
Baldgreene
 
Posts: 6
Joined: 26 Mar 2016, 21:26
Location: France

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby Baldgreene » 27 Mar 2016, 17:58

Hi,

For those being interested, here is a crude script enabling the power management feature of the board in RuneAudio (tested with the RuneAudio_rpi2_rp3_0.4-beta_20160321_2GB.img image for Rpi 3)

Code: Select all
#!/bin/bash
# Script enabling the power management feature of the Audiophonics
# I-Sabre V3 DAC ES9023 TCXO Raspberry Pi 2.0 A+ B+ / I2S in RuneAudio.
# This script has been tested on a Rpi 3 with RuneAudio image
# RuneAudio_rpi2_rp3_0.4-beta_20160321_2GB.img.
# Adapted from http://forum.audiophonics.fr/viewtopic.php?f=4&t=1578
localdir=`pwd`
#
#
# Build wiringPi if required
if [ ! -f /usr/local/bin/gpio ] ; then
  echo 'Building wiringPi'
  # Check for gcc and install it if missing
  pacman -Qi gcc &> /dev/null
  gcc_installed=$?
  if [ $gcc_installed -ne 0 ] ; then
    pacman -Syy
    pacman -S gcc --noconfirm
  fi
  #
  # Download wiringPi
  if [ -d wiringPi ] ; then
    echo 'A wiringPi directory already exist'
    read -p 'Do you want to overwrite it? [y/N] ' -n 1 -r
    echo
    if [[ !($REPLY =~ ^[Yy]$) ]]
    then
      echo 'You should consider another location to run this script'
      exit 1
    else
      rm -r wiringPi
    fi
  fi
  git clone git://git.drogon.net/wiringPi
  cd wiringPi
  git pull origin
  #
  # Compile wiringPi
  ./build
  if [ ! -f /usr/local/bin/gpio ] ; then
    echo 'wiringPi was not successfully installed'
    exit 1
  else
    # remove the source directory
    cd ..
    rm -r wiringPi
    # remove gcc if it was not installed initially
    if [ $gcc_installed -ne 0 ] ; then
      pacman -R gcc --noconfirm
    fi
  fi
fi
#
#
# Update the rune_shutdown script
cd /srv/http
cp command/rune_shutdown command/rune_shutdown.old
git stash
git pull
#
#
# Create a local script directory if it does not exist
cd $localdir
if [ ! -d Audiophonics_I-sabre_V3 ]; then
  mkdir Audiophonics_I-sabre_V3
fi
cd Audiophonics_I-sabre_V3
#
#
# Create a patch for the rune_shutdown script
echo '# Audiophonics I-Sabre V3 power management
if [ $1 = "poweroff" ] ; then
# power off RuneAudio
  echo "Setting pin GPIO4 High"
  /usr/local/bin/gpio -g mode 4 out
  /usr/local/bin/gpio -g write 4 1
  sleep 1
  echo "Setting pin GPIO4 Low"
  /usr/local/bin/gpio -g write 4 0
else
# reboot RuneAudio
  echo "setting pin GPIO 4 High"
  /usr/local/bin/gpio -g mode 4 out
  /usr/local/bin/gpio -g write 4 1
fi' > rune_shutdown_patch
#
#
# Create the hardware shutdown monitoring script
echo '#!/bin/bash
#
echo "Audiophonics Shutdown script starting..."
echo "Asserting pins : "
echo "ShutDown : GPIO17=in, Low"
echo "BootOK   : GPIO22=out, High"
gpio -g mode 17 in
gpio -g write 17 0
gpio -g mode 22 out
gpio -g write 22 1
#
while [ 1 ]; do
  if [ "$(/usr/local/bin/gpio -g read 17)" = "1" ]; then
        echo "ShutDown order received, RaspBerry pi will now enter in standby mode..."
        /srv/http/command/rune_shutdown poweroff
        shutdown -h -P now
        break
  fi
  sleep 0.25
done
#
exit 0
' > audiophonics_check_shutdown
#
#
# create the hardware shutdown monitoring service
echo '[Unit]
Description=Startup Audiophonics
After=systemd-modules-load.service

[Service]
Type=simple
ExecStart=/usr/bin/bash /etc/audiophonics_check_shutdown

[Install]
WantedBy=multi-user.target' > audiophonics.service
#
#
# Safety check
if [[ ! -f /usr/local/bin/gpio || ! -f rune_shutdown_patch || ! -f audiophonics_check_shutdown || ! -f audiophonics.service ]]
then
  echo 'Something went wrong:  missing file(s)'
  exit 1
fi
#
#
# Install
echo 'All required files have been created'
read -p 'Do you want to install the scripts? [y/N] ' -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
  cp /srv/http/command/rune_shutdown /srv/http/command/rune_shutdown.unpatched
  cat rune_shutdown_patch >> /srv/http/command/rune_shutdown
  cp audiophonics_check_shutdown /etc
  cp audiophonics.service /usr/lib/systemd/system
  systemctl enable audiophonics
  echo 'Install is complete: RuneAudio has to be rebooted to enable the power management'
  read -p 'Do you want to reboot now? [y/N] ' -n 1 -r
  echo
  if [[ $REPLY =~ ^[Yy]$ ]]
  then
    reboot
  fi
fi


To use it, you have to connect to RuneAudio as root through ssh, copy the code above and paste it into a "script" file using a text editor (vi, nano), make it executable (chmod a+x script) and run it (./script)

Regards,

Lionel
User avatar
Baldgreene
 
Posts: 6
Joined: 26 Mar 2016, 21:26
Location: France

Re: Audiophonics I-ES9023 Sabre DAC V3 TCXO Raspberry Pi 2,0

Postby matlo74 » 10 Apr 2016, 14:53

Hi Lionel,

I am about to buy this dac. Have you somewhere a photo of your config ? Have you got a box from Audiophonics ? I heard they will sell soon specific box for this and a 7" display.

Best regards

Mat
matlo74
 
Posts: 34
Joined: 10 Apr 2016, 13:18

support RuneAudio Donate with PayPal

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 9 guests
cron