1

I am doing my own alsa project.

Having changed OS (fresh installation / no upgrade) from

PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux" 
VERSION_ID="7" 
VERSION="7 (wheezy)"
ID=raspbian 
ID_LIKE=debian

4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux

to

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian

4.14.93-v7+ #1191 SMP Wed Jan 16 11:53:33 GMT 2019 armv7l GNU/Linux

I have additionally downloaded / installed

alsa-lib-1.1.8.tar.bz2

without any errors!

Project wasn't touched inbetween - all alsa sources did compile fine under wheezy before!!!

Using the same "Makefile" under stretch I now face the following 'invalid storage class' error when compiling the project with alsa library / sources (included from /usr/include/alsa) again:

In file included from /usr/include/alsa/asoundlib.h:54:0,
             from IPI2Cserver.c:3764:
/usr/include/alsa/pcm.h:507:23: error: invalid storage class for function    ‘snd_pcm_abort’
static __inline__ int snd_pcm_abort(snd_pcm_t *pcm) { return   snd_pcm_nonblock(pcm, 2); }
                   ^~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:54:0,
             from IPI2Cserver.c:3764:
/usr/include/alsa/pcm.h:1030:20: error: invalid storage class for function   ‘snd_pcm_pack_audio_tstamp_config’
static inline void snd_pcm_pack_audio_tstamp_config(unsigned int *data,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/alsa/pcm.h:1038:20: error: invalid storage class for function ‘snd_pcm_unpack_audio_tstamp_report’
static inline void snd_pcm_unpack_audio_tstamp_report(unsigned int data, unsigned int accuracy,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:58:0,
             from IPI2Cserver.c:3764:
/usr/include/alsa/control.h:237:23: error: invalid storage class for  function ‘snd_ctl_abort’
static __inline__ int snd_ctl_abort(snd_ctl_t *ctl) { return  snd_ctl_nonblock(ctl, 2); }
                   ^~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:58:0,
             from IPI2Cserver.c:3764:
/usr/include/alsa/control.h:558:23: error: invalid storage class for function ‘snd_hctl_abort’
static __inline__ int snd_hctl_abort(snd_hctl_t *hctl) { return snd_hctl_nonblock(hctl, 2); }
                   ^~~~~~~~~~~~~~

Question now - what has changed when having migrated to stretch without any further project change?

Changes in alsa ? Changes in stretch?

Thanks in advance - any help is very appreciated!

I am not a professional / expert, so I do not feel capable to change alsa source code headers to adapt to the new situation!

Mike Kinghan
  • 55,740
  • 12
  • 153
  • 182
Karl
  • 51
  • 1
  • 7

1 Answers1

0

Thanks for answering!

Just an example from the calling main program (at line 3764, when the error comes up):

#include <alsa/asoundlib.h>   // <- line 3764

int display_alsa() {
int val;

printf("ALSA library version: %s\n",
      SND_LIB_VERSION_STR);

printf("\nPCM stream types:\n");
for (val = 0; val <= SND_PCM_STREAM_LAST; val++)
   printf("  %s\n",
    snd_pcm_stream_name((snd_pcm_stream_t)val));

...

Regards

Karl
  • 51
  • 1
  • 7
  • You seem to have a general misunderstanding of what an answer is for. Answers should answer the question at the top of the page, even if that question is asked by you. Please edit this to turn it into an answer to the question which is obviously understandable as such, or turn it into an edit of your question to add information. I would be happy to help you with undestanding the concept of answering questions in contrast to participating in a chat. So feel free to contact me and I will help you. – Yunnosch Dec 26 '19 at 21:02