Skip to content

Commit

Permalink
Merge pull request #11 from Pi4J/sound
Browse files Browse the repository at this point in the history
some changes
  • Loading branch information
DieterHolz authored Jul 30, 2021
2 parents 6c1774b + ea130a3 commit d429bb2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ You can support the project or show interest by simply starring the repo or beco

### Companies, schools and universities
- [Karakun](https://karakun.com)
<img src="sponsor-logos/KARAKUN_Logo.jpg" width="300" />

<img src="sponsor-logos/KARAKUN_Logo.jpg" width="300" alt="Karakun"/>

- [Gluon](https://gluonhq.com)

<img src="sponsor-logos/Gluon_Logo.png" width="300" />
<img src="sponsor-logos/Gluon_Logo.png" width="300" alt="Gluon"/>

- _your company is missed here_

Expand Down
5 changes: 4 additions & 1 deletion crowpi/crowpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ install -Dm 0644 /tmp/resources/wallpaper/wallpaper-static.jpg /opt/fhnw/wallpap
sudo install -Dm 0755 /tmp/resources/java/java-kiosk.py /usr/local/bin/java-kiosk

# Deploy a music sample
sudo install -Dm 0644 /tmp/resources/music/* /home/pi/Music
sudo install -Dm 0644 /tmp/resources/music/StarTrekTheme.mp3 /home/pi/Music/StarTrekTheme.mp3

# Deploy audio configuration
sudo install -Dm 0644 /tmp/resources/system/asound.conf /root/.asoundrc

# Compile and deploy helper executable for detecting primary video card
gcc -I/usr/include/libdrm -ldrm -o /usr/local/bin/detect-primary-card /tmp/resources/system/detect-primary-card.c
2 changes: 2 additions & 0 deletions crowpi/resources/java/java-kiosk.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def run(self):

# Launch JVM with patched options
self._logger.debug('Launching JVM with previously determined arguments...')
self._logger.debug(' '.join(self._args))
self._run_process(*self._args, **self._kwargs)

# JVM has exited, proceed with shutdown
Expand Down Expand Up @@ -167,6 +168,7 @@ def jvm_property(data):

# Patch '--add-modules' option
add_modules = list(filter(None, args.add_modules.split(',')))
add_modules.insert(0, 'javafx.media')
add_modules.insert(0, 'javafx.controls')
logger.debug('Patched `--add-modules`: %s', add_modules)

Expand Down
9 changes: 9 additions & 0 deletions crowpi/resources/system/asound.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}
2 changes: 1 addition & 1 deletion crowpi/resources/system/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dtparam=i2c_arm=on
dtparam=spi=on

# Enable audio
dtparam=auto=on
dtparam=audio=on

# Enable GPIO-IR
dtoverlay=gpio-ir,gpio_pin=20
Expand Down

0 comments on commit d429bb2

Please sign in to comment.