My In-Dash Nexus 7 Project

Stereos, amps, phone kits, Navi...

Re: My In-Dash Nexus 7 Project

Postby muzzrx » Wed Nov 27, 2013 8:40 pm

Seanmau5 - That's the same sorta issue i'm having. Any USB devices that are not static, are not firing up on tablet wake up.

Here's some reading on the subject. Timur himself has had the issue, but sorta passes the job onto a 3rd party app.

Apoligies for the wall of text. - see below for some more reading on it...

Using an USB DAC
FI kernel + Power Loss
Sudden loss of external power can result in a number of problematic situations. This is the case, for example, when slave devices build up state, while being in use. USB mouse and keyboard are often stateless devices and will not suffer any state related issues after a sudden power loss. But state is in play, whenever external filesystems are being used. And also, when a USB DAC is playing back an audio stream.

When a statefull USB session is interrupted by loss of external power, what happens in most cases, is that all slave devices will loose power, while the host will be able to continue operations on battery power. Even if the host will fall into deep sleep mode shortly, it will be able to keep it's state, while slave devices will loose theirs. In a power loss situation, USB slave devices will usually not unplug themselfs. From the point of view of the USB host, these devices keep being registered USB slave devices. They will just stop functioning the way they normally do.

When external power comes back, all slave devices will restart and also the host will start using external power again for it's operations. The problem takes place, when applications, running on the host, may or may not notice, that something has happened with the devices they were using just moments ago.

An application reading from an external SD-card may or may not notice, that when it is using it's file handles now, that the device is returning error codes, instead of data.
A music player application, trying to continue sending it's data stream to a USB DAC, may or may not notice, that the USB DAC is unable to play back the continued audio stream, because it has lost knowledge about data references, the host is sending.
In short, removing power from slave devices is likely to result in all sort of difficult situations. Often, these difficulties can be overcome. What is important to realize here, is that most of these problems are usually on the application level. And the only way to resolve these issues is also on the application level.

External filesystems may need to be remounted. And applications reading and writing to an external SD-card (or a SSD drive) may need to cope with a file system, suddenly being unmount and eventually getting remounted.
Music player applications may need to be triggered to pause and unpause playback. This will make them create and use new audio stream handles, which may be required for a newly started DAC to accept any music data.
Allowing a music app to continue sending an old (unpaused) audio stream to a newly restarted USB DAC, can temporary destabilize all communications on the newly established USB session. Pausing and unpausing now, may not be able to resolve the issue anymore. In some situations the problem will resolve itself over time. In other situations, killing the Music player process (or switching to a different music app) will be the only way back to normal operations. All such issues can be prevented by pausing audio going to the USB DAC, before it will restart. Installation of a dedicated Android service can solve this issue reliably.

Source: http://mehrvarz.github.io/usb-host-mode ... nt-nexus7/




Awesome read on XDA about the Sitch...
http://forum.xda-developers.com/showthr ... ?t=2029728
User avatar
muzzrx
 
Posts: 41
Joined: Mon Feb 18, 2013 5:59 pm
Location: Gold Coast, Australia
Car: 04 Liberty GT 5PSD
Real name: Mike

Re: My In-Dash Nexus 7 Project

Postby seanmau5 » Wed Nov 27, 2013 9:19 pm

Wow......

That's basically what is happening. I thought my DCDC power supply was rugged enough to withstand the ACC voltage drop..... Maybe not??
~ Team VW ~ Das Auto ~
User avatar
seanmau5
-stickered-
 
Posts: 3305
Joined: Wed Mar 23, 2011 12:34 am
Location: Sydney, NSW
Car: 2009 Volkswagen Passat CC V6
Real name: Sean
Profile URL: viewtopic.php?f=10&t=13255

Re: My In-Dash Nexus 7 Project

Postby db1 » Wed Nov 27, 2013 9:21 pm

Did you get tasker working Sean?
db1
 
Posts: 435
Joined: Tue Nov 24, 2009 7:41 pm
Location: Sydney, NSW
Car: MY08 GTB
Real name: Don

Re: My In-Dash Nexus 7 Project

Postby seanmau5 » Wed Nov 27, 2013 9:23 pm

Nope..... I have no idea! Apparently, as stated above, the USB ROM that I'm operating handles the playback but it doesn't do it. If I manually press play on the tablet after 5 seconds it plays without an issue so I thought Tasker might be able to do that for me.
~ Team VW ~ Das Auto ~
User avatar
seanmau5
-stickered-
 
Posts: 3305
Joined: Wed Mar 23, 2011 12:34 am
Location: Sydney, NSW
Car: 2009 Volkswagen Passat CC V6
Real name: Sean
Profile URL: viewtopic.php?f=10&t=13255

Re: My In-Dash Nexus 7 Project

Postby db1 » Wed Nov 27, 2013 9:33 pm

I've only been using Tasker for a couple of days, so the audio bit is waaaaaaaay out of my capacity, but the brightness I think I've got it.

Can't you just use a time context? Set the from time at 1700. Set the to time to 659. Make sure from and to are both checked
Click back then new task, click the tick.
Click + to add action
Click display then display brightness then set to 50.

Repeat but this time use the other times and max brightness.

I think it should work, but again I've only used it a couple of days so I'm no expert!
db1
 
Posts: 435
Joined: Tue Nov 24, 2009 7:41 pm
Location: Sydney, NSW
Car: MY08 GTB
Real name: Don

Re: My In-Dash Nexus 7 Project

Postby seanmau5 » Wed Nov 27, 2013 9:43 pm

Well I tried doing it exactly that way but it didn't want to work. I've since been experimenting with the auto brightness and the lux levels and it seems to be working OK... I might give the auto setting a go for a little bit to see how it goes.
~ Team VW ~ Das Auto ~
User avatar
seanmau5
-stickered-
 
Posts: 3305
Joined: Wed Mar 23, 2011 12:34 am
Location: Sydney, NSW
Car: 2009 Volkswagen Passat CC V6
Real name: Sean
Profile URL: viewtopic.php?f=10&t=13255

Re: My In-Dash Nexus 7 Project

Postby db1 » Wed Nov 27, 2013 9:45 pm

Have you got a legitimate version of Tasker? None of my tasks worked on the errrrrr trial version :wink:
db1
 
Posts: 435
Joined: Tue Nov 24, 2009 7:41 pm
Location: Sydney, NSW
Car: MY08 GTB
Real name: Don

Re: My In-Dash Nexus 7 Project

Postby seanmau5 » Wed Nov 27, 2013 9:49 pm

Yep. Cost me a massive 3ish dollars ;)
~ Team VW ~ Das Auto ~
User avatar
seanmau5
-stickered-
 
Posts: 3305
Joined: Wed Mar 23, 2011 12:34 am
Location: Sydney, NSW
Car: 2009 Volkswagen Passat CC V6
Real name: Sean
Profile URL: viewtopic.php?f=10&t=13255

Re: My In-Dash Nexus 7 Project

Postby db1 » Wed Nov 27, 2013 9:56 pm

Weird. for testing I've got it set to change brightness every other minute using the above, and so far its working as it should/
db1
 
Posts: 435
Joined: Tue Nov 24, 2009 7:41 pm
Location: Sydney, NSW
Car: MY08 GTB
Real name: Don

Re: My In-Dash Nexus 7 Project

Postby seanmau5 » Wed Nov 27, 2013 10:00 pm

Might give it a go tomorrow night with the minute by minute testing. Any idea how to use the variable settings on Tasker?
~ Team VW ~ Das Auto ~
User avatar
seanmau5
-stickered-
 
Posts: 3305
Joined: Wed Mar 23, 2011 12:34 am
Location: Sydney, NSW
Car: 2009 Volkswagen Passat CC V6
Real name: Sean
Profile URL: viewtopic.php?f=10&t=13255

Re: My In-Dash Nexus 7 Project

Postby db1 » Wed Nov 27, 2013 10:02 pm

Nope..............awesome app but very steep learning curve
db1
 
Posts: 435
Joined: Tue Nov 24, 2009 7:41 pm
Location: Sydney, NSW
Car: MY08 GTB
Real name: Don

Re: My In-Dash Nexus 7 Project

Postby bigBADbenny » Thu Nov 28, 2013 6:52 am

Have you covered the basics like root, secure settings etc?
User avatar
bigBADbenny
 
Posts: 10485
Joined: Tue Oct 04, 2011 6:36 pm
Location: Collingwood, Melbourne
Car: MY07 GT-B 6MT OBP Wagon
Real name: Ben Richards
Profile URL: http://tinyurl.com/agvbzop

Re: My In-Dash Nexus 7 Project

Postby Harrybob » Thu Nov 28, 2013 8:18 am

seanmau5 wrote:Thanks Sonti.. I do have Timur's USB ROM. When it wakes up Poweramp opens again but playback doesn't begin, I get an error on the screen saying that the folder can not be found (all files stored on external HDD).

Is there settings in the USB host section that will fix it?


Sorry Sean, I think mine works as my music is stored on the nexus itself.

Correct me if i'm wrong but in order for the brightness to remain at the level your setting in Tasker, you'll need to put the device in car mode otherwise it will dim after a period of time. There are apps that are able to put the device into car mode because I did not see the option to do so in any of the settings.

Also the function to pause and play the music is the "mediaControl" and within that set the action variable to be pause. So when you lose power and music is playing it will pause, but once you receive power or wakes from sleep set a wait task for about 5 seconds or so and then call on the same "mediaControl" function to play the music.
Harrybob
 
Posts: 69
Joined: Tue Apr 05, 2011 11:28 am
Location: Melbourne, VIC
Car: MY07 Liberty 3.0R Spec.B
Real name: Sonti

Re: My In-Dash Nexus 7 Project

Postby BlackSTI » Sun Dec 08, 2013 1:17 pm

So has anyone sorted / thoughts on reversing camera connected to the nexus?
Team Funeral.
Black 07 Tuned by Sti Sedan.
User avatar
BlackSTI
 
Posts: 150
Joined: Sat Apr 27, 2013 4:06 pm
Location: Brisbane
Car: Subaru Liberty MY07 STI #7
Profile URL: viewtopic.php?t=23595

Re: My In-Dash Nexus 7 Project

Postby HyRax » Sun Dec 08, 2013 1:54 pm

BlackSTI wrote:So has anyone sorted / thoughts on reversing camera connected to the nexus?

A "driverless" Video-For-Linux-compatible USB composite video capture device is all you need.

I was going to procrastinate, but I put it off...
User avatar
HyRax
 
Posts: 1202
Joined: Sat Jul 30, 2011 12:25 am
Location: Sydney
Car: ADM MY19 3.6R Outback
Real name: Jeff
Profile URL: viewtopic.php?f=10&t=15482

PreviousNext

Return to Audio options

Who is online

Users browsing this forum: No registered users and 1 guest