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

(re)enable mute for TX16S based on RM feedback #3701

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented Jun 20, 2023

Based on feedback received from Radiomaster customers, they would prefer to re-enable mute for TX16S.

I'll do later a user configurable version, but for 2.10

Would be nice if this one could be part of 2.9

@pfeerick pfeerick added this to the 2.9 milestone Jun 20, 2023
@pfeerick pfeerick added the partner Something specifically requested by a sponsor/partner label Jun 20, 2023
@pfeerick pfeerick merged commit d85218b into main Jun 20, 2023
@pfeerick pfeerick deleted the 3djc/tx16s-enable-mute branch June 20, 2023 09:32
@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

I lost most of the touch audio feedback (beep on touch)

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

Previous 'reference test' was trim, trim works fine, I guess we need to fine tune for touch then.

Is that on first touch or rapidly repeating ? Video would be welcomed, I'm probably no doing the right stuff to replicate

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

Here's my Sound settings and in addition I have Volume on S2 (knob in center position). After that just touch your way around the UI, e.g. carousel. In most cases there is no touch feedback sound.

image
image

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

I guess I'm not doing the right test

IMG_1293.MOV
IMG_1294.MOV

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

Anyhow I guess the best fix is to bribe @pfeerick for an early merge of #3703

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

Is this the tonight's nightly? I'll try again

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

Yeah downloaded for gh release pages (d85218b)

image

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

hit the EdgeTX logo, select model settings (does it beep?), then touch the icons on the top bar one after the other

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

Cannot link the video for some reason, but works fines here

I guess your audio circuit might be a little off spec and would require slightly different mute/unmute values? But as said above, best fix is to have it optionnal, just didn't want to squeeze in a new feature for 2.9

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

as far as I understand it you changed the unmute delay for the TX16s from 120ms to 150ms. What was the problem?

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

Not at all. Mute was completely disabled as a result of first tx16s production units as no buzzing noise was found with what we had ( #undef AUDIO_MUTE_GPIO_PIN). But since, people with several watts module have noticed a buzzing noise, many reporded the issue to Radiomaster. This simply re-enable mutes at values they where before been removed

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

Another symptom: the EdgeTX startup message "welcome to EdgeTX" is truncated to "elcome to EdgeTX". The "W" is inaudible.

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

Playing with the numbers doesn't seem to make a difference. Reverting your PR brings back the full welcome message and all touch beeps. I don't think I have a "special" out of spec TX16s (not MKII). That's why I think this PR should not be in 2.9 unless your 2.10 UI change goes with it.

@3djc
Copy link
Collaborator Author

3djc commented Jun 21, 2023

We have to understand better since nearly all radio use the feature, I will try to find if one of my tx16s behaves like yours and ask Radiomaster to conduct further tests

@mha1
Copy link
Contributor

mha1 commented Jun 21, 2023

I'll continue tomorrow with a scratch built SD card, radio.yml and a minimal model.yml to exclude config side effects. If still persistent I'll upload a video demonstrating the chopped welcome message and missing touch beeps.

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Beginning of 'welcome ' cut means you need to raise unmute delay. Try 170 maybe instead of 150

@pfeerick
Copy link
Member

pfeerick commented Jun 22, 2023

I've tried three different TX16S - a early TX16S from when non-touch was an option, and two later ones that are somewhere between the MK1 and MK2, and for all three I get the beeps on touch when sound set to all, and I don't think the welcome of hello.wav is being trimmed on mine. Sorry, I can't help with a reproducible case there! I have no issue merging #3703 once we've added the companion side support, but would still like to know what's different here.

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Same here, tested all 3 I have, cannot reproduce, and 150ms is already quite a margin above chip specification (100ms)

image

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

170ms didn't change it so I cleared the SD card, just put 2.8 release sounds on it and let the radio with tonight's nightly flashed create virgin radio.yml and model01.yml files. No more truncated welcome message. I blame my home brew sounds. But touch feedback is still the same. I noticed leaving gaps between successive touches don't have beeps, fast successive touches have beeps, most likely omitting the beep for the first one, see video https://www.youtube.com/watch?v=KxXazxZTPpU

If you want to recreated the exact condition of my test scenario flash tx16s-009b638.bin.txt and put this on your SD card RADIO.zip

image

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

image

IMG_1299.MOV

Absolutely cannot reproduce (that with your sd content installed (why mode 2!!! :D)). I seem to remenber some people near launch did mod their audio because they thought sound wasn't loud enough for them, did you do any of that ?

The way mute work is dead simple. It ways no sound for AUDIO_MUTE_DELAY duration. When there has been no sound for that long, audio chip is muted. When next sound comes, it unmutes audio chip, wait AUDIO_UNMUTE_DELAY, then play the sound.

If you don't hear the 'first beep', it means despite waiting AUDIO_UNMUTE_DELAY, the audio circuit is still not ready. Keep increasing AUDIO_UNMUTE_DELAY, so that we understand what is the value for your chip

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Nope, no HW mod whatsoever.

PS: Firefox won't show your video

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Are you sure beeps are queued and not played instantly?

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Thats the whole purpose

Nope, no HW mod whatsoever.

PS: Firefox won't show your video

Edge and chrome will tho

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

image

image

See for yourself...

Thats actually the whole issue around mute, and why it is such an annoyance, it introduces a lag of AUDIO_UNMUTE_DELAY ms

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

ok, we're getting there. 500ms makes all touches beep and as expected with a very noticeable latency. I'll do some builds to find the threshold.

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Those values are used by default in nearly all otx/edgetx radio but tx16s that was no muted by default, because RM has done an amazing job at shielding audio circuit on that radio, so it is really something that those values dont work on your radio (and as I said, already include de 50% safety margin vs chip specification)

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Result: 250ms works reliable, 240ms works but you can hear a tiny first part of the beep missing

What do we do with this? My radio sure seems not representative but it shows there are radios out there which haven't studied the specs (at least as far as the audio chip is concerned). If you want to stick with 150ms the UI options seems mandatory.

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Such a high value has me wonder if your 5v regulator hasn't blown up and audio is powered by vbat. Anyhow, I think we want the UI choice, agreed @pfeerick ?

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Does the 5V regulator also supply AUX1 and AUX2?

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Answered myself, no, Audio has its own 5V regulator. From Risto's blog:

image

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Where did you find the IDChip 8002A data sheet? I only found chinese versions of the datasheet.

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Put my scope to good use and checked the audio voltage regulator. Rock steady and noise free 5V. But my radio has a 8002D chip not a 8002A as described in Risto's TX16s HW blog. Dunno if that makes the difference.

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

I have asked RM about it, but they have some kind of dragon festival or something like that, may be a couple of days before I get an answer

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Can you take a look at one of your working radios which version of the 8002 it has exactly?

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

I have extended CPN with PR #3710 as counterpart to your PR #3703. It adds a checkbox to CPN's Edit Radio Settings page.

resulting radio.yml:
Box unchecked -> audioMuteEnable: 0
Box checked -> audioMuteEnable: 1

image
image

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Thanks a lot Neil

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

Michael

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Michael

Boy, usually elecpower jumps in like that, did not even look at the author, my apologies (to both of you!)

@mha1
Copy link
Contributor

mha1 commented Jun 22, 2023

No problemo, I should have formally introduced myself :-)

It'll still take a while to finish the check builds. I'd appreciate you trying this. And there is one thing I didn't know off hand. Currently the checkbox will be available for all radios. Are there any rules to follow, i.e. exclude specific radios or radio categories?

@3djc
Copy link
Collaborator Author

3djc commented Jun 22, 2023

Radio side it is based on hall defines, currently that's all non frsky bw radio, and all colorlcd but x12

@pfeerick
Copy link
Member

The UI option will be a good mitigation for this, as we can then wait for reports that the sound is being clipped, and then just tell people to use the option to restore the old behaviour. If we get enough reports that it's a problem, we can change things... i.e. maybe will have to bring in a configurable option and just pre-load it with the current values. Then it will be end of the issue, period 😆

@mha1
Copy link
Contributor

mha1 commented Jun 23, 2023

@3djc Yes, I saw your UI implementation is tied to AUDIO_MUTE_GPIO being defined. Look at the hal.h files I'd say the UI option should be visible for:

  • all Color LCD radios (including NV14 and the likes) except Horus X12S
  • TX12, TX12MK2, ZORRO, BOXER, T8, TLITE, TPRO, LR3PRO

Correct?

I'll update the CPN PR to reflect this.

@3djc
Copy link
Collaborator Author

3djc commented Jun 23, 2023

Looks correct. Ins't brand defined anywhere in Companion (did not look), that would be easier than de radio list.

As a side note, we should know for sure on monday the wake up time for chip used by RM

@mha1
Copy link
Contributor

mha1 commented Jun 23, 2023

I forgot Commando8. That has AUDIO_MUTE_GPIO defined.

No, but it has a family "T12 board" defined:

inline bool IS_FAMILY_T12(Board::Type board)
{
  return board == Board::BOARD_JUMPER_T12 ||
         board == Board::BOARD_RADIOMASTER_TX12 ||
         board == Board::BOARD_RADIOMASTER_TX12_MK2 ||
         board == Board::BOARD_RADIOMASTER_ZORRO ||
         board == Board::BOARD_RADIOMASTER_BOXER ||
         board == Board::BOARD_RADIOMASTER_T8 ||
         board == Board::BOARD_JUMPER_TLITE ||
         board == Board::BOARD_JUMPER_TLITE_F4 ||
         board == Board::BOARD_JUMPER_TPRO ||
         board == Board::BOARD_BETAFPV_LR3PRO ||
         board == Board::BOARD_IFLIGHT_COMMANDO8;
}

The only difference is it lists TLITE_F4 which isn't listed in taranis/hal.h. I suppose it is treated as TLITE in radio code, i.e. has a audio mute GPIO too. Correct?

This would be the resulting term for CPN:

    case HasAudioMuteGPIO:
      // All color lcd (including NV14) except Horus X12S
      // TX12, TX12MK2, ZORRO, BOXER, T8, TLITE, TPRO, LR3PRO, COMMANDO8
      return (IS_FAMILY_HORUS_OR_T16(board) && !IS_HORUS_X12S(board)) || IS_FAMILY_T12(board);

@pfeerick
Copy link
Member

TLITE_F4 is basically identical to the TLITE, it's just a different processor, so that looks about right.

pfeerick added a commit that referenced this pull request Jun 26, 2023
commit 865d34a
Author: 3djc <[email protected]>
Date:   Sat Jun 24 11:11:43 2023 +0200

    'oh boy' fix

commit c15cbf3
Author: 3djc <[email protected]>
Date:   Thu Jun 22 10:00:34 2023 +0200

    yaml update

commit a31e1e9
Author: 3djc <[email protected]>
Date:   Thu Jun 22 08:52:45 2023 +0200

    reuse !

commit d28be2d
Author: 3djc <[email protected]>
Date:   Thu Jun 22 08:39:32 2023 +0200

    yaml update

commit 7482fee
Author: 3djc <[email protected]>
Date:   Wed Jun 21 14:30:14 2023 +0200

    Fix possible muted on boot scenario

commit e51f686
Author: 3djc <[email protected]>
Date:   Wed Jun 21 12:27:37 2023 +0200

    compil fixes

commit fbde97f
Author: 3djc <[email protected]>
Date:   Wed Jun 21 12:18:11 2023 +0200

    Some compile fixes

commit fe08f71
Author: 3djc <[email protected]>
Date:   Wed Jun 21 11:12:19 2023 +0200

    User configurable audio mute

commit 5268ba0
Author: Peter Feerick <[email protected]>
Date:   Sun Jun 25 20:37:41 2023 +1000

    chore: GH should be building 2.9 branch

commit 0f0e71e
Author: Peter Feerick <[email protected]>
Date:   Sun Jun 25 20:02:14 2023 +1000

    chore: Add codename

commit 5ebd090
Author: philmoz <[email protected]>
Date:   Sun Jun 25 15:09:46 2023 +1000

    fix: Rounding errors in ADC value calculation for 6POS switch (#3713)

commit 3ea236e
Author: Peter Feerick <[email protected]>
Date:   Fri Jun 23 18:46:06 2023 +1000

    fix(sim): do not allow launching if no radio profiles found (#3712)

    * Test for existence of radio profiles and advise if not found

    * Fix message box title and move simulator name to constants

commit 41467e3
Author: Michael <[email protected]>
Date:   Fri Jun 23 05:52:54 2023 +0200

    chore: Remove rssiSource and use default value (#3643)

    * fixes #2552

    - remove edit option rssiSource
    - reset rssiOption to default (none) if carried over from OpenTX conversion

    * deleted rssiSource functional code Companion, simulator and radio

    * forgot one commented line

commit 7b509a7
Author: philmoz <[email protected]>
Date:   Fri Jun 23 10:37:12 2023 +1000

    fix(cpn): Wrong input offset value saved to YAML if GV (#3707)

commit cee7393
Author: Neil Horne <[email protected]>
Date:   Fri Jun 23 09:07:55 2023 +1000

    feat(cpn): Add radio sort order edit and sorting models list by any column (#3659)

    * feat(cpn): Add radio sort order edit (color) and sorting models list by any column (all)

    * Add column double click to enable/disable model sorting (disabled by default)

commit 470db43
Author: Michael <[email protected]>
Date:   Thu Jun 22 12:34:09 2023 +0200

    fix(color): Firmware update progress text stuck at device reset (#3704)

    * fixes #3695 flash progress

    * move init() to where it belongs (constructor)

commit 302bf3e
Author: richardclli <[email protected]>
Date:   Thu Jun 22 13:14:12 2023 +0800

    fix: 3POS switches on certain radios not detecting all switch positions (#3568)

    * Quick and dirty fix for #3560.

    * Fixed build error.

    * Fixed problematic logic.

    * Code cleanup.

commit a1528db
Author: richardclli <[email protected]>
Date:   Wed Jun 21 18:56:55 2023 +0800

    chore: Add EL18 specific build for v2.9 (#3539)

    * chore: Add EL18 specific firmware naming (#2609)

    * Added EL18 specific firmware naming.

    * fix: Update USB identifier

    * chore: Add to github builds

    * fix: Lowercase s in Flysky

    * chore: Reference EL18 specific firmware file

    Co-authored-by: Peter Feerick <[email protected]>

    * chore(el18): Change default switch cfg to match production (#2675)

    * chore: no nightly build for this branch

commit 72c733c
Author: 3djc <[email protected]>
Date:   Tue Jun 20 11:32:12 2023 +0200

    fix: (re)enable time based mute for TX16S based on RM feedback (#3701)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
partner Something specifically requested by a sponsor/partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants