Using alsa library on Linux












1















Ubuntu 18.04



I'm very new to sounds programming in Linux and I'm trying to work with ALSA library. I have alsa-library installed on my machine as follows:



/dev/snd$ sudo apt-file list libasound2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
libasound2: /usr/share/doc/libasound2/NEWS.Debian.gz
libasound2: /usr/share/doc/libasound2/changelog.Debian.gz
libasound2: /usr/share/doc/libasound2/copyright
libasound2: /usr/share/doc/libasound2/examples/asoundrc.txt.gz


The problem is that my header files



ll /usr/include/sound/
total 208
drwxr-xr-x 2 root root 4096 Nov 15 07:06 ./
drwxr-xr-x 41 root root 4096 Nov 11 10:26 ../
-rw-r--r-- 1 root root 21847 Oct 23 17:44 asequencer.h
-rw-r--r-- 1 root root 19132 Oct 23 17:44 asoc.h
-rw-r--r-- 1 root root 4377 Oct 23 17:44 asound_fm.h
-rw-r--r-- 1 root root 45851 Oct 23 17:44 asound.h
-rw-r--r-- 1 root root 6743 Oct 23 17:44 compress_offload.h
-rw-r--r-- 1 root root 16992 Oct 23 17:44 compress_params.h
-rw-r--r-- 1 root root 17240 Oct 23 17:44 emu10k1.h
-rw-r--r-- 1 root root 2697 Oct 23 17:44 firewire.h
-rw-r--r-- 1 root root 3140 Oct 23 17:44 hdsp.h
-rw-r--r-- 1 root root 5486 Oct 23 17:44 hdspm.h
-rw-r--r-- 1 root root 4304 Oct 23 17:44 sb16_csp.h
-rw-r--r-- 1 root root 7494 Oct 23 17:44 sfnt_info.h
-rw-r--r-- 1 root root 11574 Oct 23 17:44 snd_sst_tokens.h
-rw-r--r-- 1 root root 4041 Oct 23 17:44 tlv.h
-rw-r--r-- 1 root root 1939 Oct 23 17:44 usb_stream.h


are completely different from what is specified in the documentation Files section. For instance no conf.h header and as a consuqence no



struct    snd_devname_t;


definition. Alsa version I got from the alsa-info script is



!!ALSA Version
!!------------
Driver version: k4.15.0-36-generic
Library version: 1.1.3
Utilities version: 1.1.3


the latest one currently available.



Should I install some other package to get the all includes available? I did some file search



$ find / -name alsa 2>/dev/null
/etc/default/alsa
/etc/apm/scripts.d/alsa
/run/alsa
/usr/share/alsa
/usr/share/sounds/alsa
/usr/src/linux-headers-4.15.0-39-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-36-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-34-generic/include/config/thinkpad/acpi/alsa
/var/lib/alsa
/sbin/alsa


and did not notice them.










share|improve this question


















  • 2





    Check if you have libasound2-dev package installed.

    – n.m.
    Nov 15 '18 at 6:53













  • @n.m. Thanks, that what the problem was about!

    – Some Name
    Nov 15 '18 at 6:59
















1















Ubuntu 18.04



I'm very new to sounds programming in Linux and I'm trying to work with ALSA library. I have alsa-library installed on my machine as follows:



/dev/snd$ sudo apt-file list libasound2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
libasound2: /usr/share/doc/libasound2/NEWS.Debian.gz
libasound2: /usr/share/doc/libasound2/changelog.Debian.gz
libasound2: /usr/share/doc/libasound2/copyright
libasound2: /usr/share/doc/libasound2/examples/asoundrc.txt.gz


The problem is that my header files



ll /usr/include/sound/
total 208
drwxr-xr-x 2 root root 4096 Nov 15 07:06 ./
drwxr-xr-x 41 root root 4096 Nov 11 10:26 ../
-rw-r--r-- 1 root root 21847 Oct 23 17:44 asequencer.h
-rw-r--r-- 1 root root 19132 Oct 23 17:44 asoc.h
-rw-r--r-- 1 root root 4377 Oct 23 17:44 asound_fm.h
-rw-r--r-- 1 root root 45851 Oct 23 17:44 asound.h
-rw-r--r-- 1 root root 6743 Oct 23 17:44 compress_offload.h
-rw-r--r-- 1 root root 16992 Oct 23 17:44 compress_params.h
-rw-r--r-- 1 root root 17240 Oct 23 17:44 emu10k1.h
-rw-r--r-- 1 root root 2697 Oct 23 17:44 firewire.h
-rw-r--r-- 1 root root 3140 Oct 23 17:44 hdsp.h
-rw-r--r-- 1 root root 5486 Oct 23 17:44 hdspm.h
-rw-r--r-- 1 root root 4304 Oct 23 17:44 sb16_csp.h
-rw-r--r-- 1 root root 7494 Oct 23 17:44 sfnt_info.h
-rw-r--r-- 1 root root 11574 Oct 23 17:44 snd_sst_tokens.h
-rw-r--r-- 1 root root 4041 Oct 23 17:44 tlv.h
-rw-r--r-- 1 root root 1939 Oct 23 17:44 usb_stream.h


are completely different from what is specified in the documentation Files section. For instance no conf.h header and as a consuqence no



struct    snd_devname_t;


definition. Alsa version I got from the alsa-info script is



!!ALSA Version
!!------------
Driver version: k4.15.0-36-generic
Library version: 1.1.3
Utilities version: 1.1.3


the latest one currently available.



Should I install some other package to get the all includes available? I did some file search



$ find / -name alsa 2>/dev/null
/etc/default/alsa
/etc/apm/scripts.d/alsa
/run/alsa
/usr/share/alsa
/usr/share/sounds/alsa
/usr/src/linux-headers-4.15.0-39-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-36-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-34-generic/include/config/thinkpad/acpi/alsa
/var/lib/alsa
/sbin/alsa


and did not notice them.










share|improve this question


















  • 2





    Check if you have libasound2-dev package installed.

    – n.m.
    Nov 15 '18 at 6:53













  • @n.m. Thanks, that what the problem was about!

    – Some Name
    Nov 15 '18 at 6:59














1












1








1








Ubuntu 18.04



I'm very new to sounds programming in Linux and I'm trying to work with ALSA library. I have alsa-library installed on my machine as follows:



/dev/snd$ sudo apt-file list libasound2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
libasound2: /usr/share/doc/libasound2/NEWS.Debian.gz
libasound2: /usr/share/doc/libasound2/changelog.Debian.gz
libasound2: /usr/share/doc/libasound2/copyright
libasound2: /usr/share/doc/libasound2/examples/asoundrc.txt.gz


The problem is that my header files



ll /usr/include/sound/
total 208
drwxr-xr-x 2 root root 4096 Nov 15 07:06 ./
drwxr-xr-x 41 root root 4096 Nov 11 10:26 ../
-rw-r--r-- 1 root root 21847 Oct 23 17:44 asequencer.h
-rw-r--r-- 1 root root 19132 Oct 23 17:44 asoc.h
-rw-r--r-- 1 root root 4377 Oct 23 17:44 asound_fm.h
-rw-r--r-- 1 root root 45851 Oct 23 17:44 asound.h
-rw-r--r-- 1 root root 6743 Oct 23 17:44 compress_offload.h
-rw-r--r-- 1 root root 16992 Oct 23 17:44 compress_params.h
-rw-r--r-- 1 root root 17240 Oct 23 17:44 emu10k1.h
-rw-r--r-- 1 root root 2697 Oct 23 17:44 firewire.h
-rw-r--r-- 1 root root 3140 Oct 23 17:44 hdsp.h
-rw-r--r-- 1 root root 5486 Oct 23 17:44 hdspm.h
-rw-r--r-- 1 root root 4304 Oct 23 17:44 sb16_csp.h
-rw-r--r-- 1 root root 7494 Oct 23 17:44 sfnt_info.h
-rw-r--r-- 1 root root 11574 Oct 23 17:44 snd_sst_tokens.h
-rw-r--r-- 1 root root 4041 Oct 23 17:44 tlv.h
-rw-r--r-- 1 root root 1939 Oct 23 17:44 usb_stream.h


are completely different from what is specified in the documentation Files section. For instance no conf.h header and as a consuqence no



struct    snd_devname_t;


definition. Alsa version I got from the alsa-info script is



!!ALSA Version
!!------------
Driver version: k4.15.0-36-generic
Library version: 1.1.3
Utilities version: 1.1.3


the latest one currently available.



Should I install some other package to get the all includes available? I did some file search



$ find / -name alsa 2>/dev/null
/etc/default/alsa
/etc/apm/scripts.d/alsa
/run/alsa
/usr/share/alsa
/usr/share/sounds/alsa
/usr/src/linux-headers-4.15.0-39-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-36-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-34-generic/include/config/thinkpad/acpi/alsa
/var/lib/alsa
/sbin/alsa


and did not notice them.










share|improve this question














Ubuntu 18.04



I'm very new to sounds programming in Linux and I'm trying to work with ALSA library. I have alsa-library installed on my machine as follows:



/dev/snd$ sudo apt-file list libasound2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2
libasound2: /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
libasound2: /usr/share/doc/libasound2/NEWS.Debian.gz
libasound2: /usr/share/doc/libasound2/changelog.Debian.gz
libasound2: /usr/share/doc/libasound2/copyright
libasound2: /usr/share/doc/libasound2/examples/asoundrc.txt.gz


The problem is that my header files



ll /usr/include/sound/
total 208
drwxr-xr-x 2 root root 4096 Nov 15 07:06 ./
drwxr-xr-x 41 root root 4096 Nov 11 10:26 ../
-rw-r--r-- 1 root root 21847 Oct 23 17:44 asequencer.h
-rw-r--r-- 1 root root 19132 Oct 23 17:44 asoc.h
-rw-r--r-- 1 root root 4377 Oct 23 17:44 asound_fm.h
-rw-r--r-- 1 root root 45851 Oct 23 17:44 asound.h
-rw-r--r-- 1 root root 6743 Oct 23 17:44 compress_offload.h
-rw-r--r-- 1 root root 16992 Oct 23 17:44 compress_params.h
-rw-r--r-- 1 root root 17240 Oct 23 17:44 emu10k1.h
-rw-r--r-- 1 root root 2697 Oct 23 17:44 firewire.h
-rw-r--r-- 1 root root 3140 Oct 23 17:44 hdsp.h
-rw-r--r-- 1 root root 5486 Oct 23 17:44 hdspm.h
-rw-r--r-- 1 root root 4304 Oct 23 17:44 sb16_csp.h
-rw-r--r-- 1 root root 7494 Oct 23 17:44 sfnt_info.h
-rw-r--r-- 1 root root 11574 Oct 23 17:44 snd_sst_tokens.h
-rw-r--r-- 1 root root 4041 Oct 23 17:44 tlv.h
-rw-r--r-- 1 root root 1939 Oct 23 17:44 usb_stream.h


are completely different from what is specified in the documentation Files section. For instance no conf.h header and as a consuqence no



struct    snd_devname_t;


definition. Alsa version I got from the alsa-info script is



!!ALSA Version
!!------------
Driver version: k4.15.0-36-generic
Library version: 1.1.3
Utilities version: 1.1.3


the latest one currently available.



Should I install some other package to get the all includes available? I did some file search



$ find / -name alsa 2>/dev/null
/etc/default/alsa
/etc/apm/scripts.d/alsa
/run/alsa
/usr/share/alsa
/usr/share/sounds/alsa
/usr/src/linux-headers-4.15.0-39-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-36-generic/include/config/thinkpad/acpi/alsa
/usr/src/linux-headers-4.15.0-34-generic/include/config/thinkpad/acpi/alsa
/var/lib/alsa
/sbin/alsa


and did not notice them.







c linux alsa






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 6:33









Some NameSome Name

1,406416




1,406416








  • 2





    Check if you have libasound2-dev package installed.

    – n.m.
    Nov 15 '18 at 6:53













  • @n.m. Thanks, that what the problem was about!

    – Some Name
    Nov 15 '18 at 6:59














  • 2





    Check if you have libasound2-dev package installed.

    – n.m.
    Nov 15 '18 at 6:53













  • @n.m. Thanks, that what the problem was about!

    – Some Name
    Nov 15 '18 at 6:59








2




2





Check if you have libasound2-dev package installed.

– n.m.
Nov 15 '18 at 6:53







Check if you have libasound2-dev package installed.

– n.m.
Nov 15 '18 at 6:53















@n.m. Thanks, that what the problem was about!

– Some Name
Nov 15 '18 at 6:59





@n.m. Thanks, that what the problem was about!

– Some Name
Nov 15 '18 at 6:59












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313692%2fusing-alsa-library-on-linux%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313692%2fusing-alsa-library-on-linux%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python