Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chan_beagle: Initial port to compile on current Asterisk. #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InterLinked1
Copy link
Member

There are still a few unresolved references to SND_PCCV stuff on my machine, but otherwise, this updates the code for current Asterisk APIs. The sample config
has been moved out of the module itself into its own sample file.

Resolves: #280

@InterLinked1
Copy link
Member Author

Note re: unresolved references:

make[1]: Entering directory '/usr/src/asterisk-21.0.0/menuselect'
make[1]: 'makeopts' is up to date.
make[1]: Leaving directory '/usr/src/asterisk-21.0.0/menuselect'
   [CCi] chan_beagle.i -> chan_beagle.o
chan_beagle.c:170:34: error: ‘SND_PCCV_FORMAT_S16_LE’ undeclared here (not in a function); did you mean ‘SND_PCM_FORMAT_S16_LE’?
  170 | static snd_pcm_format_t format = SND_PCCV_FORMAT_S16_LE;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~
      |                                  SND_PCM_FORMAT_S16_LE
chan_beagle.c: In function ‘alsa_card_init’:
chan_beagle.c:516:114: error: ‘SND_PCCV_STREAM_CAPTURE’ undeclared (first use in this function); did you mean ‘SND_PCM_STREAM_CAPTURE’?
  516 |                 ast_log(LOG_DEBUG, "Opening device %s in %s mode\n", dev, (stream == SND_PCCV_STREAM_CAPTURE) ? "read" : "write");
      |                                                                                                                  ^~~~~~~~~~~~~~~~~
      |                                                                                                                  SND_PCM_STREAM_CAPTURE
chan_beagle.c:516:114: note: each undeclared identifier is reported only once for each function it appears in
chan_beagle.c:614:23: error: ‘SND_PCCV_STREAM_PLAYBACK’ undeclared (first use in this function); did you mean ‘SND_PCM_STREAM_PLAYBACK’?
  614 |         if (stream == SND_PCCV_STREAM_PLAYBACK)
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~
      |                       SND_PCM_STREAM_PLAYBACK
chan_beagle.c: In function ‘load_module’:
chan_beagle.c:1909:48: error: ‘SND_PCCV_STREAM_CAPTURE’ undeclared (first use in this function); did you mean ‘SND_PCM_STREAM_CAPTURE’?
 1909 |         alsa.icard = alsa_card_init("default", SND_PCCV_STREAM_CAPTURE);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                SND_PCM_STREAM_CAPTURE
chan_beagle.c:1910:48: error: ‘SND_PCCV_STREAM_PLAYBACK’ undeclared (first use in this function); did you mean ‘SND_PCM_STREAM_PLAYBACK’?
 1910 |         alsa.ocard = alsa_card_init("default", SND_PCCV_STREAM_PLAYBACK);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                SND_PCM_STREAM_PLAYBACK
make[1]: *** [/usr/src/asterisk-21.0.0/Makefile.rules:150: chan_beagle.o] Error 1
make: *** [Makefile:396: channels] Error 2

There are still a few unresolved references to SND_PCCV
stuff on my machine, but otherwise, this updates the
code for current Asterisk APIs. The sample config
has been moved out of the module itself into its own
sample file.

Resolves: #280
@KB4MDD
Copy link
Collaborator

KB4MDD commented Apr 29, 2024

Out of curiosity I did a search on Google and GitHub and SND_PCCV_FORMAT_S16_LE and SND_PCCV_STREAM_PLAYBACK did not find any matches.

@InterLinked1
Copy link
Member Author

Out of curiosity I did a search on Google and GitHub and SND_PCCV_FORMAT_S16_LE and SND_PCCV_STREAM_PLAYBACK did not find any matches.

Yeah, me neither - the suggested match for some was SND_PCM instead of SND_PCCV but I didn't want to make any change until we knew a little bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

beagle.conf should be removed. chan_beagle has not been ported to ASL3
2 participants