Skip to content

Instantly share code, notes, and snippets.

@pamaury
pamaury / sd.diff
Created December 14, 2011 10:25
imx233/fuze+ sd work in progress
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 79a0752..bcbecc7 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1132,7 +1132,9 @@ static bool view_battery(void)
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
-#if (CONFIG_STORAGE & STORAGE_MMC)
+#if (CONFIG_STORAGE & (STORAGE_MMC | STORAGE_SD))
@pamaury
pamaury / touchpad.diff
Created December 26, 2011 17:42
"Natural" Touchpad Driver
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
index 880bbae..f16f9f1 100644
--- a/firmware/export/config/sansafuzeplus.h
+++ b/firmware/export/config/sansafuzeplus.h
@@ -180,7 +180,7 @@
#define USE_ROCKBOX_USB
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x74e1
-#define HAVE_USB_HID_MOUSE
+#define HAVE_USB_HID_TOUCHPAD
@pamaury
pamaury / jlbiasini.diff
Created January 15, 2012 19:00
MMC panic detail
diff --git a/firmware/target/arm/imx233/mmc-imx233.c b/firmware/target/arm/imx233/mmc-imx233.c
index 8782e8e..7edfc21 100644
--- a/firmware/target/arm/imx233/mmc-imx233.c
+++ b/firmware/target/arm/imx233/mmc-imx233.c
@@ -230,6 +230,8 @@ static int transfer_sectors(IF_MD2(int drive,) unsigned long start, int count, v
ret = imx233_ssp_sd_mmc_transfer(MMC_SSP, read ? 18 : 25, start,
SSP_SHORT_RESP, buf, this_count, false, read, &resp);
}
+ if(ret != 0)
+ panicf("resp: %x", resp);
@pamaury
pamaury / fuzep_radio.diff
Created February 2, 2012 15:12
fuze+ radio
diff --git a/apps/radio/radio.c b/apps/radio/radio.c
index e9de69b..ad6071b 100644
--- a/apps/radio/radio.c
+++ b/apps/radio/radio.c
@@ -193,7 +193,7 @@ void radio_start(void)
radio_status &= ~FMRADIO_START_PAUSED;
if(radio_status == FMRADIO_OFF)
- tuner_power(true);
+ tuner_set(RADIO_POWER, 1);
@pamaury
pamaury / mmc_read.sh
Created February 6, 2012 17:09
mmc reading with recoveyr_util
./sbloader 0 recovery.sb && \
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata noresp 0 0 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata noresp 0 0 - &&
for i in $(seq 0 30); do
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 1 0x40ff8000 -
done &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata longresp 2 0 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 3 0x10000 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 7 0x10000 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 13 0x10000 - &&
@pamaury
pamaury / tryread.diff
Created March 16, 2012 15:26
Check if an address is readable in Rockbox
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
index a5b004a..f3bac29 100644
--- a/firmware/drivers/tuner/si4700.c
+++ b/firmware/drivers/tuner/si4700.c
@@ -355,6 +355,7 @@ static void si4700_sleep(int snooze)
bool si4700_detect(void)
{
+ panicf("read: %d", safe_read8(0x40000000, NULL));
if (!tuner_present) {
@pamaury
pamaury / stfm-audio.diff
Created May 27, 2012 17:01
stfm audio hack
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index e611694..bf37b3a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1873,6 +1873,11 @@ static int radio_callback(int btn, struct gui_synclist *lists)
struct stfm1000_dbg_info nfo;
stfm1000_dbg_info(&nfo);
simplelist_addline(SIMPLELIST_ADD_LINE, "STFM1000 regs:");
+ simplelist_addline(SIMPLELIST_ADD_LINE,"tune1: 0x%x", nfo.tune1);
+ simplelist_addline(SIMPLELIST_ADD_LINE,"sdnominal: 0x%x", nfo.sdnominal);
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index e611694..bf37b3a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1873,6 +1873,11 @@ static int radio_callback(int btn, struct gui_synclist *lists)
struct stfm1000_dbg_info nfo;
stfm1000_dbg_info(&nfo);
simplelist_addline(SIMPLELIST_ADD_LINE, "STFM1000 regs:");
+ simplelist_addline(SIMPLELIST_ADD_LINE,"tune1: 0x%x", nfo.tune1);
+ simplelist_addline(SIMPLELIST_ADD_LINE,"sdnominal: 0x%x", nfo.sdnominal);
Header
Base Address: 0x1000000
Section 0
Something: 0x6b
Code: 0x1000f14 |--> 0x1000000-(code)-0x1006704
Data: 0x1007618 |--> 0x20000000-(data)-0x20001564-(bss)-0x20001564
Section 1
Something: 0xed4
Code: 0x1008b7c |--> 0x1006704-(code)-0x1008ad0
Data: 0x100af48 |--> 0x20002438-(data)-0x20004770-(bss)-0x20004770
diff --git a/firmware/target/arm/imx233/audioout-imx233.c b/firmware/target/arm/imx233/audioout-imx233.c
index e9b368c..c25a7ec 100644
--- a/firmware/target/arm/imx233/audioout-imx233.c
+++ b/firmware/target/arm/imx233/audioout-imx233.c
@@ -152,9 +152,12 @@ static void apply_volume(void)
else
{
/* In DAC mode we can use both the HP and the DAC volume.
- * Use the DAC for volume <0 and HP for volume >0 */
+ * Always use the lowest possible HP volume to minimise noise: