PeteManchester / MediaPlayer

61 stars 20 forks source link

SoundCast issue with Digi+ soundcard. #41

Closed Ghuru42 closed 9 years ago

Ghuru42 commented 9 years ago

I get this error when trying to send Soundcast from my MacPro to Mediaplayer.

2015-04-27 08:29:50,246 [nioEventLoopGroup-12-1] WARN [org.rpi.java.sound.JavaSoundPlayerBasic] ###Setting Sound Card Name: #sndrpihifiberry [plughw:0,0] 2015-04-27 08:29:50,290 [nioEventLoopGroup-12-1] ERROR [org.rpi.java.sound.JavaSoundPlayerBasic] Error opening Sound: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 24 bit, stereo, 6 bytes/frame, big-endian not supported.

I got one of the DAC+ boards as well as the Element14 reference design for CS+WM8801 chip boards, will give them a try this afternoon and see if there is any difference.

PeteManchester commented 9 years ago

Is that the HifiBerry Digi+? Other people have also reported the same issue.

I would be interested to see if you get the same issue with your other DAC or even when just using the raspi Headphone out socket.

Ghuru42 commented 9 years ago

Yes, it’s with the HifiBerry Digi+. I also got a Dac+ board, and a Cirrus reference board. Will also give the headphone and hdmi output a go tonight, got them all connected at home.

Will also do quick test to se what happens when I get a Linn Exakt system to try to use the Mediaplayer as a source and target.

/J

27 apr 2015 kl. 15:04 skrev PeteManchester notifications@github.com:

Is that the HifiBerry Digi+? Other people have also reported the same issue.

I would be interested to see if you get the same issue with your other DAC or even when just using the raspi Headphone out socket.

— Reply to this email directly or view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/41#issuecomment-96643032.

Ghuru42 commented 9 years ago

Spoiler, the CirrusCard from Element14 works like a charm, this far, with Everything..

HifiBerry Digi+, mpd=ok, AirPlay=glitches on start, Songcast=Nope HifiBerry DAC+, mpd=ok, AirPlay=glitches on start, Songcast=Nope bcm HDMI, mpd=ok, AirPlay=glitches on start, Songcast=Nope Cirrus, all ok.

With snd-bcm2835, Digi+ disabled. — 2015-04-27 18:16:37,947 [main] INFO [org.rpi.main.StartMe] Available Audio Devices: 2015-04-27 18:16:38,059 [main] INFO [org.rpi.main.StartMe] 'ALSA [default]' 2015-04-27 18:16:38,062 [main] INFO [org.rpi.main.StartMe] 'ALSA [plughw:0,0]' 2015-04-27 18:16:38,075 [main] INFO [org.rpi.main.StartMe] 'ALSA [plughw:0,1]' 2015-04-27 18:16:38,076 [main] INFO [org.rpi.main.StartMe] 'Port ALSA [hw:0]' 2015-04-27 18:16:38,076 [main] INFO [org.rpi.main.StartMe] End Of Audio Devices — Java soundcard set to plughw:0,0: Sound from MPD is played on HDMI ok. When activating songcast on MacBook Pro: 2015-04-27 18:17:31,103 [nioEventLoopGroup-5-1] WARN [org.rpi.java.sound.JavaSoundPlayerBasic] ###Setting Sound Card Name: #ALSA [plughw:0,0] 2015-04-27 18:17:31,136 [nioEventLoopGroup-5-1] ERROR [org.rpi.java.sound.JavaSoundPlayerBasic] Error opening Sound: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 24 bit, stereo, 6 bytes/frame, big-endian, and buffers of 16000 to 16000 bytes is supported. Java soundcard set to plughw:0,1 Sound from MPD is played on HDMI ok. When activating songcast on MacBook Pro: 2015-04-27 18:21:46,918 [nioEventLoopGroup-9-1] WARN [org.rpi.java.sound.JavaSoundPlayerBasic] ###Setting Sound Card Name: #ALSA [plughw:0,1] 2015-04-27 18:21:46,922 [nioEventLoopGroup-9-1] ERROR [org.rpi.java.sound.JavaSoundPlayerBasic] Error opening Sound: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 24 bit, stereo, 6 bytes/frame, big-endian, and buffers of 16000 to 16000 bytes is supported.

With DAC+ card, snd-bcm2835 disabled. Sound from MPD is heard from line out. When activating songcast on MacBook Pro: 2015-04-27 18:31:58,284 [nioEventLoopGroup-9-1] WARN [org.rpi.java.sound.JavaSoundPlayerBasic] ###Setting Sound Card Name: #sndrpihifiberry [plughw:0,0] 2015-04-27 18:31:58,293 [nioEventLoopGroup-9-1] ERROR [org.rpi.java.sound.JavaSoundPlayerBasic] Error opening Sound: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 24 bit, stereo, 6 bytes/frame, big-endian not supported.

With CirrusLogic card: — 2015-04-27 18:48:18,236 [main] INFO [org.rpi.main.StartMe] Available Audio Devices: 2015-04-27 18:48:18,346 [main] INFO [org.rpi.main.StartMe] 'sndrpiwsp [default]' 2015-04-27 18:48:18,348 [main] INFO [org.rpi.main.StartMe] 'sndrpiwsp [plughw:0,0]' 2015-04-27 18:48:18,360 [main] INFO [org.rpi.main.StartMe] 'Port sndrpiwsp [hw:0]' 2015-04-27 18:48:18,361 [main] INFO [org.rpi.main.StartMe] End Of Audio Devices — After running ”SPDIF_playback.sh” 2015-04-27 19:00:53,387 [nioEventLoopGroup-9-1] WARN [org.rpi.java.sound.JavaSoundPlayerBasic] ###Setting Sound Card Name: #sndrpiwsp [plughw:0,0] Success, soundcast works from my MacBook Pro. And AirPlay works without any glitches. And mpd plays everything so far, including my 192Khz 24bit FLAC,s.. I used this guide and tgz archive to get the cirrus card working.. http://www.element14.com/community/message/145591/l/re-cirrus-logic-audio-card-working-on-the-raspberry-pi-2#145591 http://www.element14.com/community/message/145591/l/re-cirrus-logic-audio-card-working-on-the-raspberry-pi-2#145591 Will have to bring this to the shop in morning and see how the Cirrus card spdif output holds up compared to the Digi+ and Linn systems..

Still going over all the options this card has, alsamixer is just plain stupid in the amount of ”mixer channels” listed…

/J

27 apr 2015 kl. 15:35 skrev Johan Winäs johan@databeredning.se:

Yes, it’s with the HifiBerry Digi+. I also got a Dac+ board, and a Cirrus reference board. Will also give the headphone and hdmi output a go tonight, got them all connected at home.

Will also do quick test to se what happens when I get a Linn Exakt system to try to use the Mediaplayer as a source and target.

/J

27 apr 2015 kl. 15:04 skrev PeteManchester <notifications@github.com mailto:notifications@github.com>:

Is that the HifiBerry Digi+? Other people have also reported the same issue.

I would be interested to see if you get the same issue with your other DAC or even when just using the raspi Headphone out socket.

— Reply to this email directly or view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/41#issuecomment-96643032.

PeteManchester commented 9 years ago

Thanks for testing.

It looks like it is specific to certain DACs as to if they support 24bit big endian PCM streams, do you know if it is just the Mac Songcast that sends in this format or also the DS?

For the glitches at the start of Airplay there is a new config option for the beta version

airplay_audio_start_delay=true

If you set this to true there will be a slight delay between Airplay starting and the audio being output. This is to try and hide the glitches caused by the descryption libraries taking most of the CPU resources.

Ghuru42 commented 9 years ago

I will do more tests to see what different platforms send, as well as what the Linn units send and accept.

I have noticed that my MacBook is very sensitive to load during songcast, if get outtakes and glitches every now and then as soon as I try to use the computer. Like when using iTunes in the background to play music. I have raised the ”latency” setting to 600mS but have not found any big differens. Will try to use a Linn system as a songcast receiver from the MacBook and se how that behaves..

I agree that it’s probably a driver/dac issue with supporting BE or LE streams. The Cirrus card has ”the same” hardware for spdif as the Digi+, but the cirrus support both formats to my guess is that the driver swaps the bit order on the fly… Maybe the speaker_test utility can send both formats, would make it easier to test what cards/drivers support what.

/J

28 apr 2015 kl. 12:37 skrev PeteManchester notifications@github.com:

Thanks for testing.

It looks like it is specific to certain DACs as to if they support 24bit big endian PCM streams, do you know if it is just the Mac Songcast that sends in this format or also the DS?

For the glitches at the start of Airplay there is a new config option for the beta version

airplay_audio_start_delay=true

If you set this to true there will be a slight delay between Airplay starting and the audio being output. This is to try and hide the glitches caused by the descryption libraries taking most of the CPU resources.

— Reply to this email directly or view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/41#issuecomment-97010245.

Ghuru42 commented 9 years ago

With the latest Beta everything works as it should with the Cirrus Logic card from Farnell. I can just conclude that the drivers HifiBerry provides are not as complete as the one Cirrus has made, lets just hope that the Cirrus driver gets added to the official firmware.