|
Post by jminneman on Jan 8, 2014 8:59:06 GMT -5
First, thank you for all you hard work on this awesome software. It is the best.
I have permanently installed a tablet in my car complete with USB DAC and USB storage.
I would like to request the ability to select between behaviors for when USB drops (or more specifically when a file suddenly becomes unavailable).
I am using Timurs USB ROM on my Nexus 7 and one change that was made to this rom is it enters sleep mode when charging stops. Sleep mode on Android halts the USB host service which disconnects all USB devices. When this happens GMMP immediately tries to skip to the next track, if it isnt found it tries the track after that and so on until it runs out of tracks or the tablet goes to sleep.
I would like the option of having GMMP just pause right where its at when a file just disappears, this way when my USB storage comes back GMMP can resume where it left off.
Is this possible?
|
|
|
Post by GoneMAD on Jan 8, 2014 10:30:49 GMT -5
yea this was requested a few times awhile ago.. i have it on my list.. just the list has 250-300 items.. so it takes me awhile to get to things
the question i have is why is it entering sleep mode when charging stops if you are still using the device? That seems like a bad design decision on the ROMs part
|
|
|
Post by GoneMAD on Jan 8, 2014 10:37:35 GMT -5
also do you know if the device broadcasts
String ACTION_USB_DEVICE_ATTACHED Broadcast Action: A broadcast for USB device attached event. String ACTION_USB_DEVICE_DETACHED Broadcast Action: A broadcast for USB device detached event.
those 2 when it powers up/down the usb host? if so then it would be easy to add it in to the already existing auto pause/resume feature (which currently includes wired, bluetooth, and dock connections)
|
|
|
Post by jminneman on Jan 8, 2014 11:45:17 GMT -5
Sorry, I guess I skipped the posts where this was mentioned. Thanks for the reply.
This ROM also has a feature to power devices from the USB port even while in OTG mode. So shutting down the USB host makes sense since otherwise the USB devices would drain the tablet battery. I just wish the dev had made this an option so that people with a more robust system (USB devices powered by car) could get optimal behavior. Unfortunately the dev that created this awesome ROM quit and took his code with him otherwise I would ask him to make the necessary change.
I will check the logs to see what is broadcast.
Again, thanks for your awesome software and your reply.
|
|
|
Post by jminneman on Jan 8, 2014 14:01:30 GMT -5
Here is what I could find in the logs: From the kernel log: <6>[45978.717979] usb 2-1: USB disconnect, device number 2 <6>[45978.718408] usb 2-1.1: USB disconnect, device number 3 <6>[45978.734686] -tegra_otg_irq(): ID=0 VBUS=512 <6>[45978.734835] -tegra_otg_irq(): ID=0 VBUS=512 DONE <6>[45978.735141] tegra-otg tegra-otg: !USB_ID_INT_STATUS but USB_VBUS_INT_STATUS id_is_set)1 <6>[45978.735262] tegra-otg tegra-otg: USB_VBUS_INT_STATUS <6>[45978.735469] tegra-otg tegra-otg: !USB_VBUS_STATUS: to=OTG_STATE_A_SUSPEND (power loss) <6>[45978.735683] tegra-otg tegra-otg: HOST --> SUSPEND <6>[45978.735800] tegra-otg tegra-otg: call smb347_otg_status() <4>[45978.736014] smb347_otg_status from=9 to=10 hostmode=1 externalPowerState=1 usbhost_charge_slave_devices=0 fixed_install_mode=1 <6>[45978.745669] usb 2-1.2: USB disconnect, device number 4 <6>[45978.827491] cable_type_detect() <6>[45978.827573] INOK=H no power <4>[45978.827637] ======================================================== <4>[45978.827702] battery_callback usb_cable_state = 0 <4>[45978.827767] ======================================================== <4>[45978.827885] battery_callback cable_wake_lock 5 sec... <4>[45978.827889] <6>[45978.828083] elan-ktf3k 1-0010: Update power source to 0 <4>[45978.828473] smb347_otg_status disable host-mode and stop slave-charging <4>[45978.828612] smb347_configure_otg otg=0 chargeSlaves=0 stopSlaves=0 lastOtg=1 <4>[45978.829218] smb347_configure_otg disable host mode <4>[45978.831039] smb347_otg_status allow battery to be charged <4>[45978.831950] smb347_configure_charger accept external power <4>[45978.832940] smb347_otg_status make external power detectable2 <4>[45978.834225] smb347_otg_status DONE hostmode=0 externalPowerState=0 chargeSlaveDevicesState=0 <6>[45978.834352] tegra-otg tegra-otg: call tegra_stop_host() <6>[45978.834499] Wake39 for irq=52 <6>[45978.834616] Disabling wake39 <6>[45978.834696] tegra-ehci tegra-ehci.0: remove, state 1 <6>[45978.834782] usb usb2: USB disconnect, device number 1 <6>[45978.848169] usb 2-1.4: USB disconnect, device number 5 <3>[45978.848950] hub 2-0:1.0: hub_port_status failed (err = -19) <3>[45978.849077] hub 2-0:1.0: connect-debounce failed, port 1 disabled <6>[45978.888385] tegra-ehci tegra-ehci.0: USB bus 2 deregistered <6>[45978.888667] tegra-otg tegra-otg: done id_is_set=1 ##############
<4>[45990.002907] #### ehci-tegra tegra_usb_resume with smb347_deep_sleep=1 charging=0 hostmode=0 wakestatus=0x40000 0x0 0x0 0x0 <4>[45990.005620] #### ehci-tegra tegra_usb_resume POWER SUPPLY1 special wake host mode <4>[45990.005880] #### ehci-tegra tegra_usb_resume Force the phy to keep data lines in suspend state <4>[45990.006146] #### ehci-tegra tegra_usb_resume ehci_reset <4>[45990.006292] #### ehci-tegra tegra_usb_resume has_hostpc <4>[45990.006557] #### ehci-tegra tegra_usb_resume not utmip_remote_wakeup 1 1 0 <4>[45990.006695] #### ehci-tegra tegra_usb_resume phy resume from LP0 <4>[45990.006972] #### ehci-tegra tegra_usb_resume Poll until CCS is enabled... <4>[45990.007010] rt5640_resume+ <6>[45990.009624] gpio-keys gpio-keys.0: resuming <6>[45990.009771] Wake24 for irq=392 <6>[45990.010146] Disabling wake24 <6>[45990.010298] gpio-keys gpio-keys.0: resumed <6>[45990.010442] host1x host1x: resuming <6>[45990.011006] tegradc tegradc.0: resume <6>[45990.011148] tegradc tegradc.1: resume <4>[45990.011519] smb347_resume <4>[45990.014623] #### ehci-hcd handshake -ETIMEDOUT result=00000000 <3>[45990.014764] tegra_usb_resume: timeout waiting for PORT_CONNECT <4>[45990.015117] #### ehci-tegra tegra_usb_resume restart <4>[45990.015262] #### ehci-tegra tegra_usb_resume restart tegra_ehci_restart2 <4>[45990.015566] #### ehci-tegra tegra_usb_resume leave <4>[45990.031931] al3010_resume+ <4>[45990.036667] al3010_resume- <6>[45990.036962] mpe mpe: resuming <6>[45990.037135] gr3d gr3d: resuming <6>[45990.037302] dsi dsi: resuming <6>[45990.037580] gr2d gr2d: resuming <6>[45990.037725] isp isp: resuming <6>[45990.037889] vi vi: resuming <4>[45990.041390] rt5640_resume- <5>[45990.055010] hall_sensor: [lid_report_function] SW_LID report value = 1 <6>[45990.069880] alarm_resume(d6f58000) <6>[45990.070206] call alarm, type 2, func alarm_triggered+0x0/0xa0, 1391528572000000 (s 1391528572000000) firm_sleep=0 suspended=0 <6>[45990.070488] call alarm, type 0, func alarm_triggered+0x0/0xa0, 1389152381772000000 (s 1389152381772000000) firm_sleep=0 suspended=0 <6>[45990.071876] PM: resume of devices complete after 69.405 msecs <4>[45990.072446] tegra_otg_resume clear smb347_deep_sleep ############ <6>[45990.085018] tegra_otg_resume(): tegra_otg->intr_reg_data = 0X44000141 <6>[45990.085285] -tegra_otg_irq(): ID=0 VBUS=512 <6>[45990.085438] -tegra_otg_irq(): ID=0 VBUS=512 DONE <6>[45990.085719] tegra-otg tegra-otg: !USB_ID_INT_STATUS but USB_VBUS_INT_STATUS id_is_set)0 <6>[45990.085869] tegra-otg tegra-otg: USB_VBUS_INT_STATUS <6>[45990.086128] tegra-otg tegra-otg: USB_VBUS_STATUS && !id_is_set && tegra_otg_resume_flag IGNORE ####### <6>[45990.086396] -tegra_otg_resume schedule_work() <6>[45990.086556] tegra-otg tegra-otg: USB_ID_INT_STATUS <6>[45990.086820] tegra-otg tegra-otg: set id_is_set, to = OTG_STATE_A_HOST (OTG PLUGGED) <6>[45990.087072] tegra-otg tegra-otg: USB_VBUS_INT_STATUS <6>[45990.087325] tegra-otg tegra-otg: USB_VBUS_STATUS && id_is_set: to=OTG_STATE_A_HOST <6>[45990.087468] tegra-otg tegra-otg: SUSPEND --> HOST <6>[45990.087719] tegra-otg tegra-otg: call smb347_otg_status() <4>[45990.087863] smb347_otg_status from=10 to=9 hostmode=0 externalPowerState=0 usbhost_charge_slave_devices=0 fixed_install_mode=1 <6>[45990.088118] cable_type_detect() <6>[45990.088255] INOK=L <6>[45990.088542] -tegra_otg_resume schedule_work() DONE <7>[45990.088735] PM: Finishing wakeup. <4>[45990.088996] Restarting tasks ... <5>[45990.090294] smb347_charger: [cable_type_detect] Reg39 : 0x10 <5>[45990.093310] smb347_charger: [cable_type_detect] Reg3F : 0x81 <5>[45990.093593] smb347_charger: [cable_type_detect] USB_IN <5>[45990.094074] smb347_charger: [cable_type_detect] Reg3E : 0x0e <6>[45990.094404] Cable: host mode charging usb <4>[45990.094617] ======================================================== <4>[45990.094833] battery_callback usb_cable_state = 1 <4>[45990.095912] ======================================================== <4>[45990.096185] battery_callback cable_wake_lock 5 sec... <4>[45990.096196] <6>[45990.096652] elan-ktf3k 1-0010: Update power source to 1 <4>[45990.097272] smb347_otg_status allow battery to be charged <4>[45990.098824] smb347_otg_status enableOTG, dont chargeSlaves, don't stopChargeSlaves <4>[45990.099127] smb347_configure_otg otg=1 chargeSlaves=0 stopSlaves=0 lastOtg=0 <4>[45990.099734] smb347_configure_otg enable host mode <4>[45990.100934] smb347_otg_status make external power detectable2 <4>[45990.102881] smb347_otg_status DONE hostmode=1 externalPowerState=1 chargeSlaveDevicesState=0 <6>[45990.103190] tegra-otg tegra-otg: call tegra_start_host() <6>[45990.104417] phy->instance = 0, phy->xcvr_setup_value = 58 <4>[45990.104771] create_regulator: fixed_reg_en_avdd_hdmi_usb_a01: Failed to create debugfs directory <6>[45990.105242] tegra_usb_phy_open instance 0 MAX77663_IRQ_ACOK_RISING <4>[45990.105820] done. <6>[45990.107315] Tegra emc resume: disabled bridge.emc <6>[45990.107365] tegra-ehci tegra-ehci.0: Tegra EHCI Host Controller <6>[45990.107426] tegra-ehci tegra-ehci.0: new USB bus registered, assigned bus number 2 <6>[45990.107742] suspend: exit suspend, ret = 0 (2014-01-08 04:05:11.542236000 UTC) <6>[45990.135051] tegra-ehci tegra-ehci.0: irq 52, io mem 0x7d000000 <6>[45990.135284] request_suspend_state: wakeup (3->0) at 45989580347506 (2014-01-08 04:05:11.569774000 UTC) <6>[45990.135469] late_resume: call handlers <4>[45990.135553] al3010_late_resume+ <4>[45990.141203] al3010 debug log : light sensor chip is resumed <4>[45990.141342] al3010_late_resume- <4>[45990.141412] Disp: diff_msec= 1593931 <6>[45990.155027] tegra-ehci tegra-ehci.0: USB 2.0 started, EHCI 1.00 <6>[45990.155227] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 <6>[45990.155347] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 <6>[45990.155413] usb usb2: Product: Tegra EHCI Host Controller <6>[45990.155539] usb usb2: Manufacturer: Linux 3.1.10-g25ab3af ehci_hcd <6>[45990.155606] usb usb2: SerialNumber: tegra-ehci.0 <6>[45990.156173] hub 2-0:1.0: USB hub found <6>[45990.156277] hub 2-0:1.0: 1 port detected <6>[45990.156567] Wake39 for irq=52 <6>[45990.156717] Enabling wake39 <6>[45990.156820] tegra-otg tegra-otg: done id_is_set=1 ############## <6>[45990.367243] iio-buffer, current state requested again <6>[45990.417935] grouper_panel_late_resumed <6>[45990.418015] start_drawing_late_resumed <4>[45990.418095] [ektf3k]:[elan] elan_ktf3k_ts_resume: enter <4>[45990.419982] [ektf3k]:[elan] dump repsponse: 58 <6>[45990.420198] late_resume: done <6>[45990.485161] usb 2-1: new high speed USB device number 2 using tegra-ehci <6>[45990.515668] usb 2-1: New USB device found, idVendor=0409, idProduct=005a <6>[45990.515830] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 <6>[45990.516768] hub 2-1:1.0: USB hub found <6>[45990.517197] hub 2-1:1.0: 4 ports detected <6>[45990.795240] usb 2-1.1: new high speed USB device number 3 using tegra-ehci <6>[45990.863038] usb 2-1.1: New USB device found, idVendor=067b, idProduct=2773 <6>[45990.863120] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 <6>[45990.863248] usb 2-1.1: Product: USB-SATA Bridge <6>[45990.863317] usb 2-1.1: Manufacturer: Prolific Technology Inc. <6>[45990.863440] usb 2-1.1: SerialNumber: PROLIFICMP0000000E1 <6>[45990.864696] scsi74 : usb-storage 2-1.1:1.0 <6>[45990.945361] usb 2-1.2: new full speed USB device number 4 using tegra-ehci <6>[45990.990276] usb 2-1.2: New USB device found, idVendor=08bb, idProduct=2902 <6>[45990.990409] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 <6>[45990.990477] usb 2-1.2: Product: USB Audio CODEC <6>[45990.990595] usb 2-1.2: Manufacturer: Burr-Brown from TI <4>[45990.991495] ##### sound/usb/card.c REGISTER tv_sec=45990 ++++++++++++++++++++++++ <4>[45990.992305] ##### endpoint.c snd_usb_add_audio_endpoint SUCCESS 'USB Audio'
Hope this helps. Thanks.
|
|
|
Post by jminneman on Jan 10, 2014 12:53:26 GMT -5
I found where someone had modified Apollo to have this functionality. Here is the link to the commit: github.com/clarejor/android_packages_apps_Apollo/commit/2b5a835d37db61aa1db6885b6912cf6be2a01a48Hope this helps. also do you know if the device broadcasts String ACTION_USB_DEVICE_ATTACHED Broadcast Action: A broadcast for USB device attached event. String ACTION_USB_DEVICE_DETACHED Broadcast Action: A broadcast for USB device detached event. those 2 when it powers up/down the usb host? if so then it would be easy to add it in to the already existing auto pause/resume feature (which currently includes wired, bluetooth, and dock connections)
|
|
|
Post by GoneMAD on Jan 10, 2014 16:05:11 GMT -5
thanks i'll check it out
|
|