summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/layer1
Commit message (Collapse)AuthorAgeFilesLines
* fw/prim_tch: Add support for sending frame from l23 (TRAFFIC_REQ/CONF)Sylvain Munaut2011-07-281-3/+73
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/prim_tch: Add support for sending traffic frames to l23 (TRAFFIC_IND)Sylvain Munaut2011-07-281-2/+28
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1/l23_api: Add processing of the new audio_modeSylvain Munaut2011-07-282-10/+29
| | | | | | This currently just stores it into the l1 sync state struct Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/l1: Add a queue for traffic frame to send to network (TRAFFIC_REQ)Sylvain Munaut2011-07-281-0/+27
| | | | | | | | Also hard limit to maximum 4 pending frames (should not happen !), the upstream is supposed to do its own flow control. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* l1ctl: Add definition for TRAFFIC_{REQ,CONF,IND}Sylvain Munaut2011-07-281-1/+1
| | | | | | Also adapt packet creation length in L1 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* [layer1] Adding neighbour cell measurement code to layer1.Andreas Eversberg2011-07-173-9/+172
| | | | | | When listening to BCCH, layer1 may measure the power level of neighbour cells. A list of neighbour cell frequencies need to be sent to layer1. After the measurement is done, the results are indicated to layer23.
* [rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gainAndreas Eversberg2011-07-174-5/+8
| | | | | | | | | rffe_compute_gain() is the new name for rffe_set_gain(). I needed to change this, to solve the name collision with the rffe_set_gain() function, which actually sets the absolute gain. rffe_get_gain() will now read the absolute gain which has been computed by rffe_compute_gain() or set by rffe_set_gain().
* tpu_window: Fix int16_t overflow in tpu_window calculationHarald Welte2011-07-161-2/+3
| | | | | | | | | First we add 55500 to an int16_t, then later we subtract it again. The bug only didn't become apparent as we wrap twice, once adding then subtracting. Discovered by Smatch: firmware/layer1/tpu_window.c +127 l1s_rx_win_ctrl(24) warn: value 55000 can't fit into 32767 'stop'
* fw/l1a: Add a message to safely count the length of a txqueueAndreas Eversberg2011-06-251-0/+15
| | | | | | | (that is by locking) Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso2011-04-2619-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* fw/layer1: Adding TAO loop to correct TPU window offsetAndreas Eversberg2011-03-206-2/+100
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw: set the TRF6151 tsp IDs from the rffe initializationSteve Markgraf2011-01-241-1/+0Star
| | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fixed typos in commentsThomas Waldmann2011-01-114-6/+6
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* fw/layer1: Resync TCH primitive on mode changesSylvain Munaut2010-12-271-0/+2
| | | | | | This is needed for audio to work properly in VEA mode Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Fix reset of dedicated channel stateSylvain Munaut2010-11-281-0/+3
| | | | | | | Thanks to Alex Badea <vamposdecampos@gmail.com> for pointing this out. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Fix missing include in prim_pm.cSylvain Munaut2010-11-241-0/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/l1/mframe_sched: Fix the TCH_A entries to include the MF_F_SACCH flagSylvain Munaut2010-11-141-4/+8
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Use dbm2rxlev instead of just '+110' so that overflows are handledSylvain Munaut2010-11-142-3/+3
| | | | | | | Without this, we would sometime get +143 dBm reported ... which is obviously false. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/l1: Fix TCH/H1 by properly loading the TCH mode during TCH_A taskSylvain Munaut2010-11-071-3/+3
| | | | | | | | | Altough quite counterintuitive, the TCH_A task does some voice coding work ... at least during TCH/H subchannel 1 ... Go figure ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/l1: Fix TCH/H by properly scheduling the TCHD task during 'off' slotsSylvain Munaut2010-11-072-0/+62
| | | | | | | Apparently the DSP needs to be run even during the slots without actual bursts exchange. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Change L1CTL RACH req to properly use all slotsAndreas.Eversberg2010-10-302-7/+31
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: correctly initialize afc_retriesSteve Markgraf2010-10-251-0/+1
| | | | | | | | Otherwise, when it reached AFC_RETRY_COUNT, no new FB0 tasks were scheduled, and you needed to restart the phone in order to successfully sync to a cell Signed-off-by: Steve Markgraf <steve@steve-m.de>
* target/fw/l23_api: Enable/Disable audio path appropriatelySylvain Munaut2010-10-251-0/+14
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/l23_api: Properly sync tch in DM EST REQSylvain Munaut2010-10-251-2/+14
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Add support for the various TCH multi frame tasksSylvain Munaut2010-10-252-2/+79
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Add initial version of TCH primitivesSylvain Munaut2010-10-252-1/+599
| | | | | | | | | | The initial bringup is mainly Dieter Spaar's work. I took the logic and rewrote it, adapting to later scheduler changes and adding support for several other things (tch_mode, initial HR support, various cleanup, ...). Initially-Written-by: Dieter Spaar <spaar@mirider.augusta.de> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Store the GSM48 constants in l1s.tch_mode instead of DSP csteSylvain Munaut2010-10-251-6/+3Star
| | | | | | | | At this point in the code, we don't know if we're TCH/H or TCH/F, so just store the speech mode and we'll figure out what to tell the DSP in the task code itself. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Fix msgb leak when prim_rx is half executedSylvain Munaut2010-10-251-1/+4
| | | | | | | | If the task interrupted because of a reset, an allocated msgb will be present and we need to free it instead of just loosing the reference to it. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/fw/layer1: Use common DSP API memcpy instead of repeating codeSylvain Munaut2010-10-252-18/+4Star
| | | | | | Also get rid of some early debug print that aren't needed now. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Process the tch_mode and store it for later useSylvain Munaut2010-09-282-0/+53
| | | | | | | Currently unused since no TCH support ... Will be used by future commits. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Add support for proper meas. report (and use in prim_tx_nb)Sylvain Munaut2010-09-283-13/+41
| | | | | | Rewritten based on an original patch by Andreas.Eversberg. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Add support for measurement messages from layer2/3Andreas.Eversberg2010-09-283-4/+26
| | | | | Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Introduce prim_utils.c for shared helper betwee primitivesSylvain Munaut2010-09-283-4/+44
| | | | | | Currently only share the idle frame pattern. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Introduce prim.h for all primitive related thingsSylvain Munaut2010-09-282-2/+2
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Fix type of p3 in tdma window setup/cleanup sched itemsSylvain Munaut2010-09-281-2/+2
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Remove the various checks for high TS as those should now workSylvain Munaut2010-09-261-7/+0Star
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: New TPU window sync methodSylvain Munaut2010-09-261-2/+9
| | | | | | | | This is Dieter's sync method adapted to the new TPU stuff. Not perfect, but should work for TS[0:7] as long as you leave a free frame between each TS changes ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Fix RX TPU window - no TA dependencySylvain Munaut2010-09-261-1/+0Star
| | | | | | Cut & paste errror ... the TA has nothing to do in RX Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* target/layer1: Implement host-driven Tx power controlSylvain Munaut2010-09-266-7/+73
| | | | | | | | | | It's up to L23 to change the parameters using the appropriate L1CTL call. This is a mix between Harald's version and Dieter's version of the TX control code. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Display diff in hwtimer value when lost interrupt is detectedSylvain Munaut2010-09-261-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/l23_api: Fix cut&paste typo in commentSylvain Munaut2010-09-171-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Properly set/reset ciphering parameters when neededSylvain Munaut2010-09-171-1/+6
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/dsp: Add function to load dsp ciphering parametersSylvain Munaut2010-09-171-0/+3
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Properly load the tch dsp param (including various fn) in RXSylvain Munaut2010-09-171-2/+6
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5Sylvain Munaut2010-09-171-6/+11
| | | | | | Mix between Dieter's version in tch branch and how the TSM30 does it. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw: Move channel type/mode definitions in common headerSylvain Munaut2010-09-171-18/+0Star
| | | | | | We'll need them later elsewhere than the tx prim Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw & layer23: Remove limitation about the SDCCH subchannel 4..8Sylvain Munaut2010-09-171-7/+0Star
| | | | | | This is now supported :) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Add common TPU win setup/cleanup codeSylvain Munaut2010-09-175-18/+45
| | | | | | | | | | | | Instead of each primitive doing it independently, if there is a TPU scenario in one of the item, we do a common setup with the base tn returned by rfch_get_params. Then each rx / tx window setup is relative to that 'base tn'. For TX window, you have to explicitely request an offset of 3. (this would allow for some test code to TX on ts=0 for eg.) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Convert primitives to use common DSP/TPU scenario endingSylvain Munaut2010-09-175-27/+15Star
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* fw/layer1: Add some sched items flags to signal DSP & TPU scenariosSylvain Munaut2010-09-171-1/+5
| | | | | | | If those flags are set in one of the item of the current frame, we end the tpu & dsp scenario in common code. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>