audio: Make the BSC handle the new mr_config request of the BSC API
Handle the mr_config request and set the AMR multirate config for
the given MSC. Initialize the mr_config with the AMR5.9 default we
have been using until now.
diff --git a/openbsc/include/openbsc/bsc_api.h b/openbsc/include/openbsc/bsc_api.h
index 472c8e4..f52984f 100644
--- a/openbsc/include/openbsc/bsc_api.h
+++ b/openbsc/include/openbsc/bsc_api.h
@@ -34,6 +34,13 @@
void (*classmark_chg)(struct gsm_subscriber_connection *conn,
const uint8_t *cm2, uint8_t cm2_len,
const uint8_t *cm3, uint8_t cm3_len);
+
+ /**
+ * Configure the multirate setting on this channel. If it is
+ * not implemented AMR5.9 will be used.
+ */
+ void (*mr_config)(struct gsm_subscriber_connection *conn,
+ struct gsm48_multi_rate_conf *conf);
};
int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 6eebcdd..8e255a0 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -26,6 +26,7 @@
#include "bsc_msc.h"
#include <osmocom/core/timer.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <regex.h>
@@ -68,6 +69,7 @@
int rtp_base;
/* audio codecs */
+ struct gsm48_multi_rate_conf amr_conf;
struct gsm_audio_support **audio_support;
int audio_length;