• 1
  • 93
  • 94
  • 95(current)
  • 96
  • 97
  • 156
OpenELEC Testbuilds for RaspberryPi Part 3 (Kodi 14.0)
(2014-09-23, 01:12)Unfledged Wrote: If a sample would help, let me know know and I'll capture and provide a short sample (with changing aspect ratios, though this doesn't appear to affect live TV). Again, though, this will be tomorrow.

I've pushed a fix for a problem I was seeing (which was only occurring when deinterlace was enabled, although I could imagine it occurring in other cases).

See if it's fixed in the next build and if it isn't then a sample file would be useful.
(2014-09-22, 22:03)BoBeRzE Wrote: Hello,

since kernel 3.16.3 is in use my Pi does no freeze anymore when i set up my HifiBerry DAC (not DAC+) as default audio output device. But now i get only a "white noise" when i play some audio content. Even the menu sound are only a white noise. When i check the DAC with e.g. "aplay -vv /storage/music/M1F1-int16WE-AFsp.wav" the sound is fine.

Any ideas?
Does the "int16" part of the filename mean it is 16 bit audio?
Have you definitely tried to 'aplay' a 24 bit wav file?
Hello,

yes it was a 16Bit file

Code:
aplay -vv /storage/music/M1F1-int16WE-AFsp.wav
Playing WAVE ‘/storage/music/M1F1-int16WE-AFsp.wav’ : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
Hardware PCM card 0 ‘snd_rpi_hifiberry_dac’ device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 4000
period_size : 1000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 1000
period_event : 0
start_threshold : 4000
stop_threshold : 4000
silence_threshold: 0
silence_size : 0
boundary : 2097152000
appl_ptr : 0
hw_ptr : 0
# + | 07%

But my main problem is since OpenElec use kernel 16.3.1 and 16.3.2 my Pi freezed immediately when i set up the HfifBerry DAC as output device. Then i tried to blacklist "lirc_rpi" -> the Pi does not freeze but i have no sound with my HifiBerry DAC. With this two kernel versions i also get no sound with the aplay command above. The output is the same but i get no sound. But since the latest Openelec Version use kernel 3.16.3 i have only a problem with the white noise in XBMC.

I also descriped my Problem here, here and here.

Thank you
Did a quick scan of your references. They don't answer my question, but prompt an additional one. So, (1) What happens when you aplay a 24 bit wave? and (2) Is snd-bcm2835 loaded before or after the dac drivers in /etc/modules?

While you're at it, please post contents of '.asoundrc'
Hi plugh,

I downloaded a 24Bit Testfile from here

Its not possible to play a 24Bit file

Code:
OpenELEC:~ # aplay -vv /storage/music/M1F1-int24WE-AFsp.wav
Playing WAVE '/storage/music/M1F1-int24WE-AFsp.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Stereo
aplay: set_params:1297: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 6000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 24000
TICK_TIME: 0
OpenELEC:~ #

At the moment i dont have a '.asoundrc' in /storage/.config/ because i dont need this file in the past.

aplay -l give me

Code:
OpenELEC:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
OpenELEC:~ #

I created asound.conf in /storage/.config/ an did a reboot but i still get no sound with my HifiBerry DAC.

Code:
pcm.!default {
   type plug
    slave {
      pcm "hw:0,0"
   }
}

lsmod gives me

Code:
OpenELEC:~ # lsmod
Module                  Size  Used by
cfg80211              213147  0
8192cu                603401  0
snd_soc_pcm512x_i2c     1481  0
snd_soc_wm8804          6900  0
snd_soc_tas5713         4760  0
regmap_spi              1465  1 snd_soc_wm8804
snd_soc_pcm512x         6092  1 snd_soc_pcm512x_i2c
regmap_i2c              1974  3 snd_soc_wm8804,snd_soc_pcm512x_i2c,snd_soc_tas5713
lirc_rpi                5972  3
lirc_dev                7885  1 lirc_rpi
rc_core                13961  1 lirc_dev
snd_soc_hifiberry_dac     1728  0
snd_soc_pcm5102a        1046  1
snd_soc_bcm2708_i2s     5577  2
regmap_mmio             2181  1 snd_soc_bcm2708_i2s
snd_soc_core          100609  6 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_hifiberry_dac,snd_soc_tas5713,snd_soc_pcm5102a,snd_soc_bcm2708_i2s
snd_compress            7084  1 snd_soc_core
snd_pcm_dmaengine       2927  1 snd_soc_core
snd_pcm                62712  3 snd_soc_core,snd_soc_hifiberry_dac,snd_pcm_dmaengine
snd_timer              17660  1 snd_pcm
snd                    41549  4 snd_soc_core,snd_timer,snd_pcm,snd_compress
bcm2708_rng              808  0
OpenELEC:~ #

Thank you very much for your help Nod
I'm a bit surprised to see the dac as card 0; I have had 'issues' in the past if bcm2835 wasn't loaded as card 0, but perhaps that is ok (I'm not up on the openelec and that particular kernel).

re: .asoundrc, again, I don't know if alsa looks in "/storage/.config/" for it on your sys or not. If that file existed when you ran your aplay test, I'd be inclined to say that it is not seeing it.

please try the following playback incantation

aplay -D "plughw:0,0" -f S24_LE -vv /storage/music/M1F1-int24WE-AFsp.wav
and/or
aplay -D "plughw:0,0" -vv /storage/music/M1F1-int24WE-AFsp.wav

FYI - What we're trying to determine is if a recent driver patch which re-enabled 24 bit playback is the cause of your white noise, or if that is specific to xbmc. The driver supports "s24_le" (not s24_3le) so hopefully that aplay incantation will do the format conversion.
Hi,

thank you for the fast answer. For asound.conf i use the OpenElec Wiki: Link

I tried your commands, no sound at all.

Code:
OpenELEC:~ # aplay -D "plughw:0,0" -f S24_LE -vv /storage/music/M1F1-int24WE-AFsp.wav
Warning: format is changed to S24_3LE
Playing WAVE '/storage/music/M1F1-int24WE-AFsp.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Stereo
aplay: set_params:1297: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 6000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 24000
TICK_TIME: 0
OpenELEC:~ #

Code:
OpenELEC:~ # aplay -D "plughw:0,0" -vv /storage/music/M1F1-int24WE-AFsp.wav
Playing WAVE '/storage/music/M1F1-int24WE-AFsp.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Stereo
aplay: set_params:1297: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 6000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 24000
TICK_TIME: 0
OpenELEC:~ #

In the first command i see aplay switch to S24_3LE but you say the driver dont support S24_3LE.

Many Thanks

Edit: Could you provide me the right test sample?
New OpenELEC Helix build: #0923
(Supercedes previous build)

Code:
# uname -a
Linux rpi512 3.16.3 #1 PREEMPT Tue Sep 23 20:41:16 BST 2014 armv6l GNU/Linux

# vcgencmd version
Sep 19 2014 16:49:58
Copyright (c) 2012 Broadcom
version 193e6925ff92741775b3893fbd95bb8b6dc41e41 (clean) (release)

# lsb_release
OpenELEC (Milhouse) - Version: devel-20140923204005-r19280-g62cd040 [Build #0923]

Based on tip of OpenELEC master (62cd0400, changelog) and tip of XBMC master (ba3e7973, changelog) with the following modifications:
  • Includes newclock4 patches
  • Excludes the OpenELEC fernetmenta patches due to conflicts with newclock4
  • Excludes the OpenELEC linux-01-RPi_support patch in favour of sourcing these and possibly more recent patches directly from kernel branch rpi-3.16.y
  • Excludes the OpenELEC xbmc-001-newclock4 patch in favour of sourcing these and possibly more recent patches directly from newclock4 branch
  • Default setting for "Show RSS Feed" changed to disabled
  • Disabled "Total Duration" in Confluence (see build #0221 for details)
  • Adapted service.openelec.settings to take advantage of PR5217
  • Includes latest libnfs master (ab1af695)
  • Includes latest libcec master (81e38211)
  • Includes latest xbmc-pvr-addons master (dcda159b)
  • Includes latest xbmc-addon-xvdr master (a3724213)
  • Includes libcec double-key suppression
  • Includes libcec CEC Standby Fix
  • Increase scan interval of PeripBusCEC from 5000 to 60000, reducing CPU loading by about 2% (1GHz Pi) every 5 seconds (even when CEC is "disabled")
  • Includes CONFIG_COREDUMP=y to allow creation of coredumps (see here)
  • Includes PR5222: videodb: Add column name on GROUP query otherwise sub query returns no rows
  • Includes PR5247: StringUtils: optimize Split(), new overloads for Split() and Tokenize()
  • Includes PR5309: [posix] Implement new PosixFile
  • Includes PR5312: dvdplayer: do a seek after having changed subtitle stream
  • Includes PR5324: Add setting to hide library clean progress bar.
  • Includes PR5386: Fix incorrect usage of S_IFDIR flag
  • Includes PR5395: [fix] Closes #15423 Addon update deadlock due to race condition deleting CThread
Build Highlights:
  1. Potential white noise and aspect ratio fixes (reported by BoBeRzE and Unfledged, respectively)
Build Details:
  1. OpenELEC:
    • readline: fix build if ncurses headers are not found for various reasons
    • parted:init: fix build
    • config/functions: unset $CPP if set on host OS
    • Revert "readline: fix build if ncurses headers are not found for various reasons"
    • Revert "llvm: dont check for gcc version when building hosttools, this should fix #3492"
  2. XBMC:
    • [UX] Play button/action should not pause (PR:5307, 3 commits, 4 files changed)
    • [cosmetic] fix .gitignore for Linux (and other Makefile builds) (PR:5388, 1 commit, 1 file changed)
    • [bluray][Fix] Release overlay groups on flush. (PR:5378, 1 commit, 1 file changed)
    • [depends] Update libiconv to 1.14 (PR:5286, 2 commits, 2 files changed)
    • CHG: [droid] Splash.java: check sdcard readyness + refactor (PR:5258, 1 commit, 1 file changed)
    • [osx] - get secondary DNS (PR:5373, 1 commit, 1 file changed)
    • [OMX] Revive OMX backend for Tegra (PR:5348, 1 commit, 11 files changed)
    • [PVR][input] allow custom keymaps also for PVR radio (PR:5327, 3 commits, 14 files changed)
    • Refactor disc number methods (PR:5188, 1 commit, 8 files changed)
    • [3D] usability fixes and cleanup (PR:5236, 9 commits, 7 files changed)
    • [bluray] Cast click coordinates from float to uint16_t. (PR:5392, 1 commit, 1 file changed)
    • dvdplayer: adapt matroshka ssa subs to ffmpeg 2.4 api change (PR:5399, 1 commit, 2 files changed)
    • [osx] - update readme - we support Xcode 6.0.1 against 10.9 SDK
  3. newclock4:
    • [mmalrenderer] Reset state in UnInit to ensure aspect ratio is re-initialised after a configure
  4. kernel 3.16.y:
    • pcm5102a: Don't report S24_LE support, it produces white noise with xbmc
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
This is an audio capture from my pi using some i2s hardware I'm developing (some distortion).

In this case, aplay -D "hw:0,0" ... should do the trick.

(Seems the forum will only let me attach it as a zip file)
PS DON'T upgrade to the release in the preceding post before testing.
(2014-09-23, 01:21)popcornmix Wrote:
(2014-09-23, 01:12)Unfledged Wrote: If a sample would help, let me know know and I'll capture and provide a short sample (with changing aspect ratios, though this doesn't appear to affect live TV). Again, though, this will be tomorrow.

I've pushed a fix for a problem I was seeing (which was only occurring when deinterlace was enabled, although I could imagine it occurring in other cases).

See if it's fixed in the next build and if it isn't then a sample file would be useful.

Live tv looks to be working perfectly on aspect ratio change - with and without deinterlacing enabled - on the latest build. Thanks for the fix Smile (And thanks for the builds Milhouse!)

Still showing problems with playing back recorded tv. No matter what the intended aspect ratio, they all display at the aspect ratio of the actual video if that makes sense. Just to be clear this is with OMXPlayer disabled - a quick test with it enabled shows the files playing back at the intended aspect ratio.

Short sample here, and if there's anything else I can provide to help track down the issue, let me know.
(2014-09-23, 22:19)plugh Wrote: This is an audio capture from my pi using some i2s hardware I'm developing (some distortion).

In this case, aplay -D "hw:0,0" ... should do the trick.

(Seems the forum will only let me attach it as a zip file)
PS DON'T upgrade to the release in the preceding post before testing.

I did a short test before i go work. This file plays fine with aplay. Big Grin

After what i installed the last Milhouse build and i get normal sound in kodi > no white noise. But i found a strange behavior.

In kodi i cant play your test file (FORMAT: S24_LE) respectively i get a destroyed sound but now i get clear sound of my other testfiles (FORMAT: S24_3LE). I have to say before i tested only with aplay.

I have to test more when i back at home.

Many many thanks!!!
Look at the last line of the release announcement post. That is what changed.

If it's not to much trouble, I'd appreciate you running a few more tests under the previous build?

1) play my sample with xbmc (with no asound config)
2) add the following asound config
Code:
pcm.!default {
    type plug
    slave {
        pcm {
        type hw
        card 0
        format S16_LE
        rate "unchanged"
        channels "unchanged"
}   }   }
3) now run aplay test(s) with '-D default', and xbmc tests

Note that you might have to experiment with the config file. Try aplay with it as shown; if aplay gives error, remove rate and channels lines. My expectation is you will get noise with test (1), and the (3) tests will all 'work'.

What that config file (should) do is give YOU control over what format the pcm data is delivered to the DAC. (FYI -the driver supports S16_LE, S24_LE, and S32_LE, except for the new build which disabled S24_LE again). The ALSA 'plug' plugin will do a format conversion to the format you specify in the config file if needed (you will see this step in the aplay -v output). You might also want to try S32_LE, which would preserve the resolution of 24 bit audio while (hopefully?) avoiding the problem causing the noise.

Regarding the noise problem - Your aplay test says it is not a driver or DAC problem. The problem is within xbmc (which test 1 should confirm). Interestingly, I stumbled across another case where s24_le data produces noise. Playing that sample on Windows with vlc also fails! Now, what does xbmc under Linux on a pi have in common with vlc under windows on a pc? ffmpeg/libav...

and Thank YOU for running the tests!
Afterthought - that config file might not avoid the xbmc noise issue, depending upon how smart ffmpeg code is trying to be. You might have to reduce it to
Code:
pcm.!default {
    type hw
    card 0
    format S16_LE }
This would present a default device to xbmc that only supports the specified PCM format (try s32_le, too). The problem with using this config is that it would also restrict aplay (and other non-ffmpeg based players) unless bypassed via ' -D "hw:0,0" ' It is still a workaround for the xbmc issue though...
(2014-09-24, 13:32)plugh Wrote: Regarding the noise problem - Your aplay test says it is not a driver or DAC problem. The problem is within xbmc (which test 1 should confirm). Interestingly, I stumbled across another case where s24_le data produces noise. Playing that sample on Windows with vlc also fails! Now, what does xbmc under Linux on a pi have in common with vlc under windows on a pc? ffmpeg/libav...

s24_le.wav plays as noise on Pi with xbmc with analogue/hdmi output.
Also plays as noise on Ubuntu with xbmc, vlc or mplayer.

Audacity shows the file as very quiet. I was only able to hear/see the "testing 1,2,3,4" after running a normaliser to amplify the sound (and it played okay).

Not sure if the 24-bit playback issue is the same issue as the 24-bit ALSA.

Note: I have 24-bit files in other formats that xbmc handles correctly.
Can't comments on all your cases, but the bcm2835 driver (both analog and hdmi) does not declare support for S24_LE. (S16_LE for hdmi, U8 & S16_LE for pwm analog). So in those cases libav is downconverting it. The only case that isn't clear at the moment is what libav does with 16 and 24 bit data when presented with an S32_LE (only) device. Presumably it will upconvert it, but whether that will exhibit the noise problem is unknown (until boberze or someone with a dac runs tests).

(Jeez it's been YEARS since I last dug into this stuff - Does mplayer use libav?)
  • 1
  • 93
  • 94
  • 95(current)
  • 96
  • 97
  • 156

Logout Mark Read Team Forum Stats Members Help
OpenELEC Testbuilds for RaspberryPi Part 3 (Kodi 14.0)8
This forum uses Lukasz Tkacz MyBB addons.