Stable: 2.5.2
Development: 2.6-alpha3
I can't get moc to work.
I've tried putting everything in
~/.moc/config
but I always get some error.
this is my aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: D90 [D90], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
i have try
AlsaDevice = default
Running the server...
Trying ALSA...
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
plughw:0,0
Running the server...
Trying ALSA...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/control/control.c:1471:(snd_ctl_open_noupdate) Invalid CTL plughw:0,0
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
plughw:0
Trying ALSA...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/control/control.c:1471:(snd_ctl_open_noupdate) Invalid CTL plughw:0,0
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
plughw:0,1
Trying ALSA...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.4/work/alsa-lib-1.2.4/src/control/control.c:1471:(snd_ctl_open_noupdate) Invalid CTL plughw:0,1
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
also have cmus on my system and cmus works with both default:0 and plughw:0
This is : Music On Console
Version : 2.6-alpha3
Revision : 2933
Built : Mar 27 2021 00:34:07
Compiled with : ALSA
Running on : Linux 5.10.14-GentooPlayer-MIN-NOGRAPH+ aarch64
Author : Damian Pietras
Homepage : http://moc.daper.net/
E-Mail : mocmaint@daper.net
Copyright : (C) 2003-2016 Damian Pietras and others
License : GNU General Public License, version 2 or later
jcf
Fri, 2021-04-02 06:48
Permalink
Thanks For Reminding Me
Yes, we have had this sort of problem in the past and even on my own machine I've found that something which works for
aplay
(1) doesn't necessarily work for MOC (and visa versa). When I compared the code inaplay
(1) with that in MOC, I could see no significant differences except (IIRC) the order in which some of the calls to the ALSA library were made. But (again IIRC) the order could not be resequenced in MOC for some reason I can't immediately recall.It's been some time since I looked into it and I'll have to take another look at it.
In the meantime, I apologise for the inconvenience.
jcf
Fri, 2021-04-02 07:18
Permalink
Having Now Read My Original Diagnostic Notes
It seems that
hw:0
orhw:1
might work, but there is no software volume control. If you have a volume control on your speakers, this might work as a circumvention.antonellocaroli
Fri, 2021-04-02 15:53
Permalink
hw:0
hw:0
Running the server...
Trying ALSA...
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
hw:1
Running the server...
Trying ALSA...
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
my config
antonellocaroli
Fri, 2021-04-02 16:00
Permalink
My config
My config
SoundDriver = ALSA
#ALSAMixer1 = PCM
#ALSAMixer2 = master
AlsaDevice = hw:0
antonellocaroli
Fri, 2021-04-02 19:02
Permalink
Ok
Ok
I solved it by installing version 2.5.2.
so something is wrong with version 2.6
with version 2.5.2 i have a problem that it does not compile with ffmpeg
##################################
ffmpeg.c: In function ‘find_first_audio’:
ffmpeg.c:315:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
315 | if (ic->streams[result]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
| ^~
In file included from ffmpeg.c:67:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
ffmpeg.c: In function ‘ffmpeg_init’:
ffmpeg.c:513:2: warning: ‘avcodec_register_all’ is deprecated [-Wdeprecated-declarations]
513 | avcodec_register_all ();
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libavformat/avformat.h:312,
from ffmpeg.c:67:
/usr/include/libavcodec/avcodec.h:2751:6: note: declared here
2751 | void avcodec_register_all(void);
| ^~~~~~~~~~~~~~~~~~~~
ffmpeg.c:514:2: warning: ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
514 | av_register_all ();
| ^~~~~~~~~~~~~~~
In file included from ffmpeg.c:67:
/usr/include/libavformat/avformat.h:2050:6: note: declared here
2050 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
ffmpeg.c:521:2: warning: ‘av_lockmgr_register’ is deprecated [-Wdeprecated-declarations]
521 | rc = av_lockmgr_register (locking_cb);
| ^~
In file included from /usr/include/libavformat/avformat.h:312,
from ffmpeg.c:67:
/usr/include/libavcodec/avcodec.h:4118:5: note: declared here
4118 | int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
| ^~~~~~~~~~~~~~~~~~~
ffmpeg.c: In function ‘ffmpeg_destroy’:
ffmpeg.c:530:2: warning: ‘av_lockmgr_register’ is deprecated [-Wdeprecated-declarations]
530 | av_lockmgr_register (NULL);
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libavformat/avformat.h:312,
from ffmpeg.c:67:
/usr/include/libavcodec/avcodec.h:4118:5: note: declared here
4118 | int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
| ^~~~~~~~~~~~~~~~~~~
ffmpeg.c: In function ‘ffmpeg_open’:
ffmpeg.c:968:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
968 | data->enc = data->stream->codec;
| ^~~~
In file included from ffmpeg.c:67:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
ffmpeg.c:996:34: error: ‘CODEC_CAP_TRUNCATED’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_TRUNCATED’?
996 | if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
| ^~~~~~~~~~~~~~~~~~~
| AV_CODEC_CAP_TRUNCATED
ffmpeg.c:996:34: note: each undeclared identifier is reported only once for each function it appears in
ffmpeg.c:997:23: error: ‘CODEC_FLAG_TRUNCATED’ undeclared (first use in this function); did you mean ‘AV_CODEC_FLAG_TRUNCATED’?
997 | data->enc->flags |= CODEC_FLAG_TRUNCATED;
| ^~~~~~~~~~~~~~~~~~~~
| AV_CODEC_FLAG_TRUNCATED
ffmpeg.c:1028:34: error: ‘CODEC_CAP_DELAY’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DELAY’?
1028 | if (data->codec->capabilities & CODEC_CAP_DELAY)
| ^~~~~~~~~~~~~~~
| AV_CODEC_CAP_DELAY
ffmpeg.c: In function ‘decode_packet’:
ffmpeg.c:1294:3: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations]
1294 | len = avcodec_decode_audio4 (data->enc, frame, &got_frame, pkt);
| ^~~
In file included from /usr/include/libavformat/avformat.h:312,
from ffmpeg.c:67:
/usr/include/libavcodec/avcodec.h:3024:5: note: declared here
3024 | int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
| ^~~~~~~~~~~~~~~~~~~~~
ffmpeg.c: In function ‘seek_in_stream’:
ffmpeg.c:1406:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
1406 | avcodec_flush_buffers (data->stream->codec);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ffmpeg.c:67:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
make[3]: *** [Makefile:416: libffmpeg_decoder_la-ffmpeg.lo] Error 1
#########################################
version 2.6, on the other hand, compiles without problems even with ffmpeg, but unfortunately does not work with alsa.....
jcf
Fri, 2021-04-02 21:01
Permalink
Clues And Patches
So it would appear. I shall add that to the pile of clues.
Those problems were addressed in the repository (r2969..r2975) but have not yet made it into a distribution tarball. If you wish I can e-mail you the necessary patches.
antonellocaroli
Sat, 2021-04-03 04:02
Permalink
yes, thank you.
yes, thank you.
but by adding these patches, will the internet streams work?
antonellocaroli@gmail.com
antonellocaroli
Sat, 2021-04-03 06:55
Permalink
ok I also solved with ffmpeg.
ok I also solved with ffmpeg....
But I would like to solve the problem with version 2.6 :(
antonellocaroli
Sat, 2021-04-03 07:18
Permalink
with version 2.5 i can't play
with version 2.5 i can't play internet radios...and it doesn't see dsf files
maybe it's a feature that was added in 2.6?
jcf
Sat, 2021-04-03 07:34
Permalink
DSF Support Is 2.6
Yes, DSF support was added in MOC 2.6 (r2876).
If it's HTTPS support you're asking about, see the answer to the second question asked given here. If it's not HTTPS, could you explain the problem you're having in more detail, please?
jcf
Sat, 2021-04-03 07:26
Permalink
So No Patches?
So you no longer require the FFmpeg patches?
antonellocaroli
Sat, 2021-04-03 07:34
Permalink
No, I solved it.
No, I solved it.
But with version 2.5 I can't play internet radio and it doesn't see dsf files...
:(
antonellocaroli
Sat, 2021-04-03 07:40
Permalink
not https
not https
ex.
http://icecast.radiofrance.fr/fipnantes-midfi.mp3
Could not open URL: No such file or directory
antonellocaroli
Sat, 2021-04-03 10:54
Permalink
OK, also solved with the
OK, also solved with the radios, it was necessary to activate the USE curl....
now we just need to understand why 2.6 doesn't work
do you have any idea?
jcf
Sat, 2021-04-03 23:38
Permalink
So, We're Making Progress
What is the "USE curl"?
As mentioned previously, the only theory so far is that it has something to do with the sequence of calls to the ALSA library. In particular, MOC uses mixers whereas
play
andaplay
do not. I will need to have a look at thecmus
code.But it's also interesting that you say it works with MOC 2.5.2. Again as an interim measure you could try backporting the applicable 2.6 patches to 2.5. (I'm assuming from what you've said thus far that you're capable of doing that.)
antonellocaroli
Sun, 2021-04-04 08:03
Permalink
Again as an interim measure
I don't know how to do this....
I tried to apply the changes to ffmpeg for dsd support to version 2.5
but i get this error if i play a dsf file:
(0) Unknown sample format: ittle-endian (native)
during compilation I have this, I don't know if it indicates anything useful:
jcf
Sun, 2021-04-04 09:48
Permalink
It Decoded But Didn't Play
It's actually ALSA saying it doesn't support the sample format supplied by FFmpeg when decoding a DSF file. From what I see here, you were successful in backporting the patch and the actual decoding succeeds.
But there's obviously something still wrong and I can't determine it from this.
Could you run
mocp
with the-D
option, attempt to play the DSF audio which failed and e-mail me the compressedmocp_server_log
file produced, please.What versions of FFmpeg and ALSA are you using?
antonellocaroli
Sun, 2021-04-04 10:35
Permalink
I sent an email to
I sent an email to
mocmaint@daper.net
I hope it is right...
antonellocaroli
Sun, 2021-04-04 15:28
Permalink
I did yet another experiment
I did yet another experiment to try to understand why version 2.6 does not work.
I replaced the alsa.c file in version 2.6 with the one from 2.5 and it works.
I don't understand the C language but it seems that the problem is to be found in this diff
https://github.com/antonellocaroli/mocp1/commit/ed73fb31b251abc97ac48702a6fd7b827e2403e7
###############################################
with regard to native dsd and dop maybe this can help to implement it:
https://github.com/marcoc1712/squeezelite-R2/blob/Release/dsd.c
https://github.com/marcoc1712/squeezelite-R2/blob/Release/dop.c
https://github.com/marcoc1712/squeezelite-R2/tree/Release/dsd2pcm