Play sounds with nsa320s?

Marvell Kirkwood based
User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Play sounds with nsa320s?

Post by MrDini » Sat Mar 12, 2016 8:34 pm

Hi!

I've got a "noname" usb sound card and I decided to use it with my nas. I compiled cmus, but I can't find any working module for the card. With my rpi it works fine.

Here is the lsusb's output:

Bus 001 Device 005: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2382
Joined: Sun Apr 29, 2012 5:24 pm

Re: Play sounds with nsa320s?

Post by barmalej2 » Sat Mar 12, 2016 8:58 pm

Try

Code: Select all

modprobe snd-usb-audio index=0

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Sun Mar 13, 2016 8:40 am

Ok thanks. But the alsa-lib package is missing. So I tried to compile it to my nas. But it not worked so I Googled the error and I found this patch: http://patches.openembedded.org/patch/116005/

I tried to apply it with patch ./<patch name> but the console was blank. How Can I use it? I never used patch before it...

And one more thing. The patch contains diff --git command. But if my memory good the --git command not exists in diffutils package...

Thanks.
Thanks nas-central the lot of help! :)

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Sun Mar 13, 2016 3:19 pm

Yeah! I manually edited the src/topology/parser.c and it worked!!! :)

But a small how to use guide isn't bad for me! :D
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2382
Joined: Sun Apr 29, 2012 5:24 pm

Re: Play sounds with nsa320s?

Post by barmalej2 » Sun Mar 13, 2016 6:36 pm

The patch you found doesn't applies to alsa-lib source directly. This patch modifies patches for alsa-lib. So logically your structure is totally different and patch will fail. All you need is just to add missing header file.
diff --git has nothing to do here. It was used for creating patch itself.
BTW. I uploaded alsa-lib package to slacker repo.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Sun Mar 13, 2016 6:53 pm

barmalej2 wrote:BTW. I uploaded alsa-lib package to slacker repo.
Me too. :) alsa-lib-1.1.0-arm-0.txz And some other package that I'm used for cmus compile. (But not to the slacker repo...)
Thanks nas-central the lot of help! :)

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 8:55 am

Awesome! It works!

I found an alsa driver and I modprobe-d it. After it I created a "mount point" with mknod to /dev/dsp and with compiped madplay I Can play music.

But the cmus cannot be used, because cmus says I haven't got good ffmpeg... (I'm using barmalej2 compilation) I tried to compile ffmpeg for me. Grrrrgh! It was ~4 hours! :o And the finally package is ~30 mb! But it didn't solve my problem with cmus... So I created an issue at github. I hope somebody know the answer...

Here is the configure faluire:

Code: Select all

checking for FFMPEG_LIBS (pkg-config)... -lavformat -lavcodec
checking for FFMPEG_CFLAGS (pkg-config)...
checking for header <libavcodec/avcodec.h>... yes
checking for successful build of ffmpeg.c... no
configure failed.
Thanks nas-central the lot of help! :)

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 10:48 am

And one more thing. For xmms compile I have to install glib-config to /ffp/bin/ folder. What package contains that? I Cannot find them at glib package...
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2382
Joined: Sun Apr 29, 2012 5:24 pm

Re: Play sounds with nsa320s?

Post by barmalej2 » Mon Mar 14, 2016 3:12 pm

glib-config was a part of glib 1.x version Since glib 2.x it is not distributed anymore and pkg-config is used: https://developer.gnome.org/glib/stable ... iling.html
Paste your full ./configure <options> command and configure output. With mine ffmpeg cmus configures successfully:
checking for FFMPEG_LIBS (pkg-config)... -lavformat
checking for FFMPEG_CFLAGS (pkg-config)...
checking for header <libavcodec/avcodec.h>... yes
checking for successful build of ffmpeg.c... yes
Most likely, you have not all dependent packages for ffmeg itself.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 3:18 pm

barmalej2 wrote:glib-config was a part of glib 1.x version Since glib 2.x it is not distributed anymore and pkg-config is used: https://developer.gnome.org/glib/stable ... iling.html
Paste your full ./configure <options> command and configure output. With mine ffmpeg cmus configures successfully:
checking for FFMPEG_LIBS (pkg-config)... -lavformat
checking for FFMPEG_CFLAGS (pkg-config)...
checking for header <libavcodec/avcodec.h>... yes
checking for successful build of ffmpeg.c... yes
Most likely, you have not all dependent packages for ffmeg itself.
But the minidlna works with ffmpeg and the youtube-dl python script is also works with it...

Ok, wait a minute, I will paste it.
Thanks nas-central the lot of help! :)

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 3:21 pm

Thanks nas-central the lot of help! :)

barmalej2
Posts: 2382
Joined: Sun Apr 29, 2012 5:24 pm

Re: Play sounds with nsa320s?

Post by barmalej2 » Mon Mar 14, 2016 3:41 pm

I mean cmus configuration, not ffmpeg.
You think it is easy to build ffmpeg correctly? Hmmm... :roll:
I can see enabled things, which should never be enabled with your CPU and you are not using external libraries, so your ffmpeg build will be very limited in terms of functionality.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 4:01 pm

Ok. http://pastebin.com/raw/2qQrGnX1

Yes, I know the ffmpeg config is not too easy and a lot dependencies are missing. It's just a try. But not solved the issue, so I reinstalled yours.
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2382
Joined: Sun Apr 29, 2012 5:24 pm

Re: Play sounds with nsa320s?

Post by barmalej2 » Mon Mar 14, 2016 4:30 pm

What is output of:

Code: Select all

pkg-config --libs libavformat
To build your own ffmpeg, better use configuration of current working and long time tested ffmpeg build. Exclude from config options only --disable-indev=alsa --disable-outdev=alsa. I intentionally disabled linking ffmpeg to alsa library.
BTW: ffmpeg 3.0 is out.

P.S. I would advise to run lddd tool first.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: Play sounds with nsa320s?

Post by MrDini » Mon Mar 14, 2016 4:48 pm

barmalej2 wrote:What is output of:

Code: Select all

pkg-config --libs libavformat
To build your own ffmpeg, better use configuration of current working and long time tested ffmpeg build. Exclude from config options only --disable-indev=alsa --disable-outdev=alsa. I intentionally disabled linking ffmpeg to alsa library.
BTW: ffmpeg 3.0 is out.

P.S. I would advise to run lddd tool first.

Code: Select all

root@NSA320S:~# pkg-config --libs libavformat
-lavformat
I know what is lddd. :D But I haven't got "some tea" so I'm going to the shop! :lol:

Joke off! Here is the lddd's output:

Code: Select all

/ffp/lib/libpar2.so.0.0.1:
checking sub-depends for 'not found'
        libsigc-2.0.so.0 => not found (0x00000000)
/ffp/lib/libpangoft2-1.0.so.0.3200.3:
checking sub-depends for 'not found'
        libharfbuzz.so.0 => not found (0x00000000)
/ffp/lib/libpangocairo-1.0.so.0.3200.3:
checking sub-depends for 'not found'
        libharfbuzz.so.0 => not found (0x00000000)
/ffp/lib/php/extensions/no-debug-non-zts-20121212/gd.so:
checking sub-depends for 'not found'
        libpng15.so.15 => not found (0x00000000)
/ffp/lib/pango/1.8.0/modules/pango-basic-fc.so:
checking sub-depends for 'not found'
        libharfbuzz.so.0 => not found (0x00000000)
/ffp/sbin/lpadmin:
        libcups.so.2 => not found
/ffp/sbin/lpmove:
        libcups.so.2 => not found
/ffp/sbin/cupsaccept:
        libcups.so.2 => not found
/ffp/sbin/cupsctl:
        libcups.so.2 => not found
/ffp/sbin/cupsaddsmb:
        libcups.so.2 => not found
/ffp/sbin/lpinfo:
        libcups.so.2 => not found
/ffp/bin/ipptool:
        libcups.so.2 => not found
/ffp/bin/cupstestdsc:
        libcups.so.2 => not found
/ffp/bin/pango-querymodules:
        libharfbuzz.so.0 => not found
        libharfbuzz.so.0 => not found
/ffp/bin/hdsentinelarm:
        libc.so.6 => not found
/ffp/bin/cancel:
        libcups.so.2 => not found
/ffp/bin/pango-view:
        libharfbuzz.so.0 => not found
        libharfbuzz.so.0 => not found
        libharfbuzz.so.0 => not found
/ffp/bin/lpstat:
        libcups.so.2 => not found
/ffp/bin/lpoptions:
        libcups.so.2 => not found
/ffp/bin/cupstestppd:
        libcupsimage.so.2 => not found
        libcups.so.2 => not found
/ffp/bin/lp:
        libcups.so.2 => not found
Oh... The bad cups package is installed... I removed it.

I Can' see in this list the ffmpeg... :roll:
Thanks nas-central the lot of help! :)

Post Reply