Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Fiio M3k
« previous next »
  • Print
Pages: 1 ... 8 9 [10] 11 12 ... 27

Author Topic: Fiio M3k  (Read 62469 times)

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #135 on: March 31, 2021, 10:49:22 PM »
Quote from: ZoRG172 on March 31, 2021, 03:51:39 PM
This functionality is already in the rockbox and it works, you can only block the touch buttons.

Awesome! For my part, I was talking more generally about being able to always use the side button as play/pause and the middle as the selector. So far, I found this in the file 'keymap-fiiom3klinux.c'
Code: [Select]
static const struct button_mapping button_context_standard[] = {
    { ACTION_STD_PREV,        BUTTON_UP,                        BUTTON_NONE },
    { ACTION_STD_PREV,        BUTTON_PREV,                      BUTTON_NONE },
    { ACTION_STD_PREVREPEAT,  BUTTON_PREV|BUTTON_REPEAT,        BUTTON_NONE },
    { ACTION_STD_NEXT,        BUTTON_DOWN,                      BUTTON_NONE },
    { ACTION_STD_NEXT,        BUTTON_NEXT,                      BUTTON_NONE },
    { ACTION_STD_NEXTREPEAT,  BUTTON_NEXT|BUTTON_REPEAT,        BUTTON_NONE },
    { ACTION_STD_CONTEXT,     BUTTON_PLAY|BUTTON_REPEAT,        BUTTON_PLAY },
    { ACTION_STD_CANCEL,      BUTTON_HOME|BUTTON_REL,           BUTTON_HOME },
    { ACTION_STD_OK,          BUTTON_PLAY|BUTTON_REL,           BUTTON_PLAY },
    { ACTION_STD_MENU,        BUTTON_OPTION|BUTTON_REL,         BUTTON_OPTION },

    LAST_ITEM_IN_LIST
}; /* button_context_standard */

Along with other context base key bindings. I think if I went through and just changed BUTTON_PLAY to be the play action in all the context arrays it would get the change I want, but that is definitely not a long term solution and is a hacked fix. I might double check that this feature doesn't already exist then see how hard it is to add a new settings feature and maybe make it so that the buttons action in each context could be set or chosen? That way you could really customize the hell out of your buttons. But, thats definitely not a small project lol. But basically a settings tab that then lists each context, then you can choose which button you want to change and then change what that button should do maybe...
Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #136 on: March 31, 2021, 11:14:31 PM »
Quote from: ZoRG172 on March 31, 2021, 03:51:39 PM
It may well be that it is enough just to add the required variable to the config to activate Disable Touch, but I don’t know where to look.

I think I found it! And this might actually be a pretty simple and fun bug fix! Here is the code that either shows or doesn't show that menu item, its on line 80 of settings_menu.c

Code: [Select]
static int selectivesoftlock_set_mask(void* param)
{
    (void)param;
int mask = global_settings.bt_selective_softlock_actions_mask;
            struct s_mask_items maskitems[]={
                                       {ID2P(LANG_VOLUME)     , SEL_ACTION_VOL},
                                       {ID2P(LANG_ACTION_PLAY), SEL_ACTION_PLAY},
                                       {ID2P(LANG_ACTION_SEEK), SEL_ACTION_SEEK},
                                       {ID2P(LANG_ACTION_SKIP), SEL_ACTION_SKIP},
 #ifdef HAVE_BACKLIGHT
                            {ID2P(LANG_ACTION_AUTOLOCK_ON), SEL_ACTION_AUTOLOCK},
 #endif
 #if defined(HAVE_TOUCHPAD) || defined(HAVE_TOUCHSCREEN)
                        {ID2P(LANG_ACTION_DISABLE_TOUCH) , SEL_ACTION_NOTOUCH},
 #endif
                         {ID2P(LANG_ACTION_DISABLE_NOTIFY), SEL_ACTION_NONOTIFY}
                                            };

            mask = mask_select(mask, ID2P(LANG_SOFTLOCK_SELECTIVE)
                               , maskitems,ARRAYLEN(maskitems));

            if (mask == SEL_ACTION_NONE)
                global_settings.bt_selective_softlock_actions = false;
            else if (global_settings.bt_selective_softlock_actions_mask != mask)
                global_settings.bt_selective_softlock_actions = true;

            global_settings.bt_selective_softlock_actions_mask = mask;

    return true;
}

It looks like someone chose not to consider the front menu buttons on the M3K to be HAVE_TOUCHPAD, so those menu items aren't defined. I can take a look through and try and add that in, which should hopefully open those options up!

EDIT:
Found the file where I need to add#define HAVE_TOUCHPAD to enable this, but I don't have time tonight to do it, test it, and then submit the pull request but I will try and do it in the morning if everything works out
« Last Edit: March 31, 2021, 11:21:16 PM by heyspencerb »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 326
Re: Fiio M3k
« Reply #137 on: April 01, 2021, 07:54:32 AM »
Quote from: heyspencerb on March 31, 2021, 11:14:31 PM
Found the file where I need to add#define HAVE_TOUCHPAD to enable this, but I don't have time tonight to do it, test it, and then submit the pull request but I will try and do it in the morning if everything works out

It's more complicated than adding HAVE_TOUCHPAD.  But this should do the trick:

https://gerrit.rockbox.org/r/c/rockbox/+/3270

Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #138 on: April 01, 2021, 09:55:49 AM »
Awesome! I'll pull it and test it! And ZoRG172, once its merged in the new .rockbox file should be here:  https://build.rockbox.org/data/rockbox-fiiom3klinux.zip, use it in place of the one I provided but follow the same steps as before.

Edit:
Corrected the link because I have no idea what I'm talking about
« Last Edit: April 01, 2021, 11:07:15 AM by heyspencerb »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 326
Re: Fiio M3k
« Reply #139 on: April 01, 2021, 10:11:07 AM »
Quote from: heyspencerb on April 01, 2021, 09:55:49 AM
Awesome! I'll pull it and test it! And ZoRG172, once its merged in the new .rockbox file should be here: https://build.rockbox.org/data/rockbox-fiiom3k.zip, use it in place of the one I provided but follow the same steps as before.

No, that is the wrong link.  This is the correct one: https://build.rockbox.org/data/rockbox-fiiom3klinux.zip

There are now two M3K ports, neither is really considered usable -- the Linux-based one based on the xvortex code dump (running on top of the extremely buggy FiiO linux platform) and a new native bare-metal port that is where all of the ongoing development effort is focused.  Once the latter is considered usable (it currently lacks such niceties like USB and dual-boot capabilities) the linux-based port will most likely be nuked from orbit.
Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #140 on: April 01, 2021, 11:13:08 AM »
Does the new bare-metal port use the same config files as the linux one? For instance, I rebased but I still only see fiiom3klinux.h under the config directory and nothing for the new version. Are they going to share these files until the linux one is killed, then the names will be changed? Or am I just missing the bare-metal versions.
I'm mostly wondering if some of the same issues that have been fixed on the linux version (ie.  the scrolling up issues and such) will need to be fixed again on the new version, or if the fixes will be carried over?
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 326
Re: Fiio M3k
« Reply #141 on: April 01, 2021, 11:21:16 AM »
Nope, there is nothing shared between those two ports.

(and firmware/export/config/fiiom3k.h landed back into the repo on March 28th -- are you sure you're tracking the master branch?)

Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #142 on: April 01, 2021, 11:38:56 AM »
I'll double check to make sure, it might explain a lot if I'm not. Side note, when running ./rockboxdev.sh what is the target arch for the bare-metal port? Is it mips or mips-linux? Thanks

Edit:
Found fiiom3k.h in firmware/export/config/, I think my VS code hadn't updated the file list when I pulled.
« Last Edit: April 01, 2021, 11:41:00 AM by heyspencerb »
Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #143 on: April 01, 2021, 01:49:01 PM »
Figured it out! Followed the install instructions and got the bare-metal version working. But yeah those instructions are definitely not beginner friendly.

This version runs much faster than the other one though, it boots fast and the database build is a lot better and faster. Though the build definitely has some issues to get started on. The slide to scroll seems to only work in some places, and in others you need to tap to scroll, among other things. I'll look through the bug reports and submit a few as I find more issues.
Logged

Offline ZoRG172

  • Member
  • *
  • Posts: 10
Re: Fiio M3k
« Reply #144 on: April 01, 2021, 03:01:10 PM »
Quote from: heyspencerb on April 01, 2021, 09:55:49 AM
Awesome! I'll pull it and test it! And ZoRG172, once its merged in the new .rockbox file should be here:  https://build.rockbox.org/data/rockbox-fiiom3klinux.zip, use it in place of the one I provided but follow the same steps as before.

Edit:
Corrected the link because I have no idea what I'm talking about
I flashed build from the link, but the menu item did not appear. How do you know or where to track when changes are made?
Logged

Offline heyspencerb

  • Member
  • *
  • Posts: 30
Re: Fiio M3k
« Reply #145 on: April 01, 2021, 08:14:11 PM »
Quote from: ZoRG172 on April 01, 2021, 03:01:10 PM
I flashed build from the link, but the menu item did not appear. How do you know or where to track when changes are made?

if you look at the link he sent, this change hasn't been reviewed yet.
https://gerrit.rockbox.org/r/c/rockbox/+/3270

 Typically simple changes like this get accepted within a day or two. More generally, if you are really interested in what features are coming up you can go to this link and see what other changes have been submitted but not reviewed yet. It should give you an idea of just how often changes happen in the code base, though most of the changes are specific to other platforms and won't effect you.

https://gerrit.rockbox.org/r/q/status:open
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 326
Re: Fiio M3k
« Reply #146 on: April 01, 2021, 08:35:20 PM »
Quote from: heyspencerb on April 01, 2021, 08:14:11 PM
if you look at the link he sent, this change hasn't been reviewed yet.
https://gerrit.rockbox.org/r/c/rockbox/+/3270

The reason this isn't committed is that I don't know that it works properly.  That's not something I can determine on my own.

(Basically I don't know if I'm disabling the correct input device when the touchpad is "locked" -- 50/50 chance I got it right.  Assuming the rest of the changes are correct, which isn't a given)

Logged

Offline ZoRG172

  • Member
  • *
  • Posts: 10
Re: Fiio M3k
« Reply #147 on: April 02, 2021, 03:41:49 PM »
Quote from: speachy on April 01, 2021, 08:35:20 PM
Quote from: heyspencerb on April 01, 2021, 08:14:11 PM
if you look at the link he sent, this change hasn't been reviewed yet.
https://gerrit.rockbox.org/r/c/rockbox/+/3270

The reason this isn't committed is that I don't know that it works properly.  That's not something I can determine on my own.

(Basically I don't know if I'm disabling the correct input device when the touchpad is "locked" -- 50/50 chance I got it right.  Assuming the rest of the changes are correct, which isn't a given)
Send me a test build and I'll check if it works as expected.
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 269
Re: Fiio M3k
« Reply #148 on: April 02, 2021, 03:51:18 PM »
Hello, developer of the new M3K port here. Thought I'd chime in since somebody was enterprising enough to try the new native port already!

heyspencerb, I'm glad to hear you got it running. If you find any bugs -- especially major ones -- please do report them on the tracker, I can use all the help I can get with testing. The issue you described with the scrollbar is a known problem (for me), especially in the plugins -- the keymaps are a mess, some places only accept scrollbar and some places only accept tapping, but for the most part it should be simple to fix.

I'm actively working on streamlining the bootloader install but it will be Linux-only for a bit. Hopefully I should be able to get that done this weekend.
Logged

Offline dconrad

  • Developer
  • Member
  • *
  • Posts: 135
Re: Fiio M3k
« Reply #149 on: April 02, 2021, 10:04:30 PM »
I tried to follow the m3k native install instructions and managed to not only get my unit to a non-working state, but I can't boot over USB anymore. Any chance of help?

I successfully booted over USB, dumped the bootloader (presumably successfully), patched it (probably unsuccessfully?), booted over USB again, installed it, and now I just get a single keypad blink, and that's all the life it shows.

Attempting to boot over USB now gives the output:

Code: [Select]
# ./usbboot -v -c x1000 -1 ../../build-spl/spl.m3k --wait 1 -2 ../../build/rockbox.bin
Opening USB device a108:1000
Issue SET_DATA_ADDRESS 0xf4001000
Transfer 8632 bytes from host to device
Issue PROGRAM_START1 0xf4001800
Wait 1 seconds
Issue SET_DATA_ADDRESS 0x80004000
Request SET_DATA_ADDRESS failed: -7

If I boot without the SD card in place, I do get the screen to light up and say "No SD card present", so the bootloader is there in some capacity, I think.

If you wouldn't mind helping me out that would be great! I can get on IRC if that's the easiest way.
« Last Edit: April 02, 2021, 10:06:31 PM by dconrad »
Logged

  • Print
Pages: 1 ... 8 9 [10] 11 12 ... 27
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Fiio M3k
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.063 seconds with 23 queries.