[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..

mobile: init TCH state earlier (on receipt of CC ALERTING)

During a Mobile Originating voice call, we would normally start
receiving traffic indications with ringback tone (or even some
melody) before the call gets CONNECTed.  So in order for the user
to be able to hear that, we need to init the voice call handler
earlier (on receipt of CC ALERTING message).

We should not be transmitting voice/data frames before the call
gets CONNECTed, so add 'rx_only' flag to the TCH state.  In
tch_send_msg() drop msgb if this flag is set.

Rx only mode makes no sense for data calls, so in tch_recv_cb() we
discard received DL frames and thus do not trigger sending UL frames.

Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/tch.h
M src/host/layer23/src/mobile/tch.c
2 files changed, 52 insertions(+), 11 deletions(-)

Approvals:
  jolly: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved; Verified




diff --git a/src/host/layer23/include/osmocom/bb/mobile/tch.h 
b/src/host/layer23/include/osmocom/bb/mobile/tch.h
index 92bc722..293397d 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/tch.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/tch.h
@@ -5,6 +5,7 @@
 struct msgb;

 struct tch_state {
+   bool rx_only; /* Rx TCH frames, but Tx nothing */
bool is_voice; /* voice (true) or data (false) */
union {
struct tch_voice_state {
diff --git a/src/host/layer23/src/mobile/tch.c 
b/src/host/layer23/src/mobile/tch.c
index 70c9163..f63f487 100644
--- a/src/host/layer23/src/mobile/tch.c
+++ b/src/host/layer23/src/mobile/tch.c
@@ -51,24 +51,35 @@
 static int tch_recv_cb(struct osmocom_ms *ms, struct msgb *msg)
 {
struct tch_state *state = ms->tch_state;
-   int rc;

if (state == NULL) {
msgb_free(msg);
return 0;
}

-   if (state->is_voice)
-   rc = tch_voice_recv(ms, msg);
-   else
-   rc = tch_data_recv(ms, msg);
-   return rc;
+   if (state->is_voice) {
+   return tch_voice_recv(ms, msg);
+   } else {
+   /* Rx only mode makes no sense for data calls, so we discard
+* received DL frames and thus do not trigger sending UL 
frames. */
+   if (!state->rx_only)
+   return tch_data_recv(ms, msg);
+   msgb_free(msg);
+   return 0;
+   }
 }

 /* Send an Uplink voice frame to the lower layers */
 int tch_send_msg(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* Forward to RR */
+   struct tch_state *state = ms->tch_state;
+
+   if (state == NULL || state->rx_only) {
+   /* TODO: fix callers and print a warning here */
+   msgb_free(msg);
+   return -EIO;
+   }
+
return gsm48_rr_tx_traffic(ms, msg);
 }

@@ -119,18 +130,21 @@
return rc;
 }

-static void tch_trans_cstate_active_cb(struct gsm_trans *trans)
+static void tch_trans_cstate_active_cb(struct gsm_trans *trans, bool rx_only)
 {
struct osmocom_ms *ms = trans->ms;
struct tch_state *state;
enum gsm48_chan_mode ch_mode;

-   if (ms->tch_state != NULL)
+   if (ms->tch_state != NULL) {
+   ms->tch_state->rx_only = rx_only;
return; /* TODO: handle modify? */
+   }

state = talloc_zero(ms, struct tch_state);
OSMO_ASSERT(state != NULL);
ms->tch_state = state;
+   ms->tch_state->rx_only = rx_only;

ch_mode = ms->rrlayer.cd_now.mode;
switch (ch_mode) {
@@ -181,8 +195,11 @@
 static void tch_trans_state_chg_cb(struct gsm_trans *trans)
 {
switch (trans->cc.state) {
-   case GSM_CSTATE_ACTIVE:
-   tch_trans_cstate_active_cb(trans);
+   case GSM_CSTATE_CALL_DELIVERED: /* MO call: Rx CC ALERTING */
+   tch_trans_cstate_active_cb(trans, true);
+   break;
+   case GSM_CSTATE_ACTIVE: /* MO/MT call: Rx CC CONNECT */
+   tch_trans_cstate_active_cb(trans, false);
break;
case GSM_CSTATE_NULL:
tch_trans_free_cb(trans);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: 

[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 06 Feb 2024 09:35:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3: Verified+1

(1 comment)

Patchset:

PS3:
I disagree with the linter here.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 06 Feb 2024 09:35:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread fixeria
Attention is currently required from: fixeria, pespin.

fixeria has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )


Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-MessageType: deleteVote


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread laforge
Attention is currently required from: fixeria, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 06 Feb 2024 09:25:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread jolly
Attention is currently required from: fixeria, pespin.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 06 Feb 2024 08:47:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-06 Thread jolly
Attention is currently required from: fixeria, pespin.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/bc892d6e_b810faff
PS2, Line 19: Rx only mode makes no sense for data calls, so in tch_recv_cb() we
> Ah, I see your point now. […]
There can be a race condition, if someone answers a data call and starts 
sending data right after it. The switching system takes a while to forward the 
answer message and through-connects the channel. This is why faxes and other 
devices wait one or more seconds after answering a call before starting 
conversation. So there is no need for a caller to receive data before getting 
an answer.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 06 Feb 2024 08:40:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread fixeria
Attention is currently required from: jolly, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/4ff00fcc_80b138cb
PS2, Line 19: Rx only mode makes no sense for data calls, so in tch_recv_cb() we
> WI mean if the data you receive while the call is not fully connected can 
> actually contain meaningfu […]
Ah, I see your point now. But no, I don't think there can be any meaningful 
data before the call gets CONNECTed. AFAIR, it was even stated somewhere in the 
specs. that V.110 TA shall not be engaged before CC CONNECT.

When a regular phone/modem gets a data call, it remains in AT-command mode 
(assuming that auto-answer is disabled) until you send `ATA` (answer) command. 
So it's impossible to send any data before accepting a call.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 05 Feb 2024 20:23:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread pespin
Attention is currently required from: fixeria, jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/744874c0_04519b45
PS2, Line 19: Rx only mode makes no sense for data calls, so in tch_recv_cb() we
> I do not understand what you mean here, sorry.
WI mean if the data you receive while the call is not fully connected can 
actually contain meaningful data/bytes which you should not be dropping.

The CC CONNECTED signal comes out of band from the channel afaiu, so there's no 
real synch point on where the data actually starts?



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 05 Feb 2024 20:14:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread fixeria
Attention is currently required from: jolly, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3:

(2 comments)

Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/23d201da_53c09b20
PS1, Line 9: The MS would usually start receiving traffic indications with
> I've updated the COMMIT_MSG, hope it's better now.
Done


Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/b24815ba_528af712
PS2, Line 19: Rx only mode makes no sense for data calls, so in tch_recv_cb() we
> You may have a race condition between dropping rx valid data and signalling 
> data transfer started he […]
I do not understand what you mean here, sorry.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 05 Feb 2024 20:11:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread Jenkins Builder
Attention is currently required from: fixeria, jolly.

Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 3:

(1 comment)

File src/host/layer23/src/mobile/tch.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14233):
https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/34784643_03abba9b
PS3, Line 62:   } else {
else is not generally useful after a break or return



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 05 Feb 2024 20:10:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread pespin
Attention is currently required from: fixeria, jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 2:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/387baa10_30fe0d34
PS2, Line 19: Rx only mode makes no sense for data calls, so in tch_recv_cb() we
You may have a race condition between dropping rx valid data and signalling 
data transfer started here? In a voice call you don't care much, but probably 
in here you drop valid data?
I'm not sure about all this, just sharing in case it makes sense.



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 05 Feb 2024 18:09:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread Jenkins Builder
Attention is currently required from: jolly, pespin.

Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email )

Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..


Patch Set 2:

(1 comment)

File src/host/layer23/src/mobile/tch.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-14222):
https://gerrit.osmocom.org/c/osmocom-bb/+/35739/comment/600ec3bf_a84d7ae4
PS2, Line 62:   } else {
else is not generally useful after a break or return



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 05 Feb 2024 18:06:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: init TCH state earlier (on receipt of CC ALERTING)

2024-02-05 Thread fixeria
Attention is currently required from: jolly, pespin.

Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: mobile: init TCH state earlier (on receipt of CC ALERTING)
..

mobile: init TCH state earlier (on receipt of CC ALERTING)

During a Mobile Originating voice call, we would normally start
receiving traffic indications with ringback tone (or even some
melody) before the call gets CONNECTed.  So in order for the user
to be able to hear that, we need to init the voice call handler
earlier (on receipt of CC ALERTING message).

We should not be transmitting voice/data frames before the call
gets CONNECTed, so add 'rx_only' flag to the TCH state.  In
tch_send_msg() drop msgb if this flag is set.

Rx only mode makes no sense for data calls, so in tch_recv_cb() we
discard received DL frames and thus do not trigger sending UL frames.

Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/mobile/tch.h
M src/host/layer23/src/mobile/tch.c
2 files changed, 52 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/39/35739/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35739?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idd32c823639cc1fd77fcefe7e260e31a85ec
Gerrit-Change-Number: 35739
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: jolly 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset