Background: I use a Toshiba Dynadock with my Nexus player for Ethernet and USB connectivity. After the marshmallow update audio is routed to the headphone port on my dynadock instead of HMDI.
Question: Is there a way to keep sound via HDMI instead of using the dynadock? Preferably without rooting the device. Worked fine before update. Ironically i suspect the drivers in marshmallow have been improved. I may have to roll back.
Doing some investigation. I have put on Pure Nexus Rom which has had no impact so far. The sound about App looks like it might solve my issues. However currently the app crashes when trying to open. I have joined the beta program hopefully will solve it soon.
Followed the instructions on the link below. worked perfect: mybroadband.co.za/vb/showthread.php/596615-The-Droid-TV-thread?p=13722624&viewfull=1#post13722624
POSTING HERE FROM LINK SOURCE:
Links like to disappear and when you need them years later you can't find the info
-----------------------------------------------------------------------------------------------------
The Mele F10 pro controller comes with built in sound but it's designed specifically for the Mele TV box and doesn't work on other makes. When connected to other boxes, it causes android to switch to the Mele F10 sound card which disrupts video playback (stuttering) and there's no sound.
There are two ways to resolve this:
1. (Less technical) Install Soundabout and make sure that HDMI is selected as the sound output (or whatever output you are using - in other words, not USB which is the Mele device). Some people have reported an issue where the HDMI option disappears from soundabout which requires a reinstall of the app to bring it back.
2. (a little more tech but permanent - my personal fav.) Install ES File explorer and edit the audio policy file to disable USB as an audio option
Recommend you do this with a proper keyboard / mouse attached.
Install and run ES File Explorer
Under tools (left), make sure root explorer is 'on'
Click root explorer and then Mount R/W - make sure /system is set to RW
Then under local (left), select / then in the main window navigate to /system/etc and click 'audio_policy.conf' to edit it (chose ES Note Editor)
Click the menu and select 'edit'
Find the line that starts with USB and comment out all the lines in that section like this:
Code:
# usb {
# outputs {
# usb_accessory {
# sampling_rates 44100
# channel_masks AUDIO_CHANNEL_OUT_STEREO
# formats AUDIO_FORMAT_PCM_16_BIT
# devices AUDIO_DEVICE_OUT_USB_ACCESSORY
# }
# usb_device {
# sampling_rates 44100
# channel_masks AUDIO_CHANNEL_OUT_STEREO
# formats AUDIO_FORMAT_PCM_16_BIT
# devices AUDIO_DEVICE_OUT_USB_DEVICE
# }
# }
# inputs {
# usb_device {
# sampling_rates 8000|11025|16000|22050|32000|44100|48000
# channel_masks AUDIO_CHANNEL_IN_MONO
# formats AUDIO_FORMAT_PCM_16_BIT
# devices AUDIO_DEVICE_IN_USB_DEVICE
# }
# }
# }
Click back then save.
After that reboot (not sure if it's required, but it won't hurt).
Problem sorted!
Related
"Support for A2DP & AVRCP profiles."
This are the two bluetooth additions in cupcake..
Please explain me this two terms and does they mean that i can transfer files with other phones via bluetooth?
Don't post wikipedia links i dint understood any thing from there...
Advanced Audio Distribution Profile (A2DP)
allows you to transfer audio files to another device over bluetooth
Audio/Video Remote Control (AVRCP)
allows you to control audio/video on a device such as a computer or tv over bluetooth, as long as they support it.
there you go.
does any of these things allow me to transfer data(files not supported or apk files) over bluetooth?
or even images pictures?
i thought it may be with an intent but can't find anything, nor can i find anything in the mediaplayer class, but what do i have to do to trigger the stock music player and do i have to pass in a filename as the param?
mhh, something like:
Code:
Uri data = Uri.parse("file://" + mf1.getFilename());
MediaPlayer mp = android.media.MediaPlayer.create(this, data);
mp.start();
will only trigger it as a background process, not switch to it. and an intent view seems to launch a mini player inside the app, so how do i switch to the music player?
http://forum.xda-developers.com/showpost.php?p=13036528&postcount=4
Note: TouchWiz has it's own DB for music for Samsung phones, so you know, we hate them (and the second method may/maynot work on TouchWiz phones).
thanks, i need to get my head around querying the content provider now!
Hi all i'm developing an app for audio recording.
So i used the MediaRecorder class to record. Unfortunately this class hasn't got the pause method so i can just start or stop.
How can i pause the recorder?
For example i'd like to do something like this:
press rec button to start recording
press pause button
press rec button to continue recording...
press stop to save and exit.
ps: I'd like to save the output file as amr or 3gp.
Any idea?
Up
Sent from my HTC HD2 using XDA App
it doesnt appear to be possible with the api's provided by the MediaRecorder class. the way you would have to do it with a MediaRecorder is to record multiple files and then merge them into one audio file. i was thinking that you could append to the file using a file descriptor but then i realized that its not just a plain text file. its an audio file with headers and a complex compressed format and just appending another audio file on the end would do nothing. here are some links
http://stackoverflow.com/questions/5190967/how-to-pause-capturing-video-in-android
http://stackoverflow.com/questions/5743165/pause-and-resume-audio-recording-in-android
http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/
this is a tough one.
ps: I'd like to save the output file as amr or 3gp.
Click to expand...
Click to collapse
this one isnt... =)
setOutputFormat(int outPutFormat);
where outPutFormat can be these values:
---------------------------------------------
int AMR_NB AMR NB file format
int AMR_WB AMR WB file format
int DEFAULT
int MPEG_4 MPEG4 media file format
int RAW_AMR AMR NB file format
int THREE_GPP 3GPP media file format
How can I stream audio within an app between specific ALSA cards/devices? Can I use the tinyalsa api directly, or will that interfere with android's system services? I have 2 USB sound cards, one with input/output, and one output only. I want my app to take audio from the input on one, and send it to the output on the other. I can use aplay to capture / play on the cards, so I know it's possible, I just don't know the best way to go about it. It looks like the PCM card and device are hardcoded to 1, 0 respectively in audio_hw.c. So it seems like the only thing to do other than modifying that file is to directly use tinyalsa to pcm_open, etc.
I've also looked at OpenSL ES, but it isn't clear how to select any input or output paths other than the defaults.
I've tried an app, UsbAudioTester, that lets me route sound to/from any usb audio device, so it's possible without modifying any of the framework.
So even though alsa_aplay works, using tinyalsa's api (pcm_open, pcm_write, etc). Fails with "unable to set sw params: invalid argument". I think I'll look at the source for aplay and work backwards from there.
I think I missed something somewhere. I have working USB audio and I have the Sound Recorder app (thank you Renate!). Today my little mic arrived. I started things going, checked to make sure the USB audio device was recognized, plugged in the mic and started the Sound Recorder app.
"No device"
So.......I'm guessing that there is something over and above what is required for audio that I have missed somewhere?
nmyshkin said:
I think I missed something somewhere. I have working USB audio and I have the Sound Recorder app (thank you Renate!). Today my little mic arrived. I started things going, checked to make sure the USB audio device was recognized, plugged in the mic and started the Sound Recorder app.
"No device"
So.......I'm guessing that there is something over and above what is required for audio that I have missed somewhere?
Click to expand...
Click to collapse
I haven't gotten quite as far as you with the audio stuff (since I've been busy with school, I haven't done any sound recording testing yet), but let me do some research, and I'll try to get back to you.
You gotta dig deep.....
So here's how it's done:
1. Make sure ALSA utilities are present in /system/bin (chmod 755)
2. Extend permission to your audio device by modifying /system/etc/permissions/platform.xml
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_rw" />
[B]<group gid="audio" />[/B]
</permission>
This solves the problem with the Recorder.apk which uses ALSA entirely, bypassing the Android system. Unfortunately it does nothing for other apps which might like to use the mic like Skype or other recording apps.
That's a whole different thing. This is what Renate suggested as the requirements:
"For basic recording or Skype
Modify /system/lib/hw/libaudio.so
Code:
[00009188] B1 F5 FA 54 => 70 BD 00 BF
[000091EC] 6C 33 => 00 05
Patch /system/framework/framework.jar with AudioRecord.smali using mergesmali, in her signature, in Nook121patch"
My libaudio.so was in /system/lib so I placed a second copy in the directory listed above after I got no result.
I did these things to the best of my ability, and although I didn't get into a bootloop or brick situation , I also had no joy
I'll have to look into this again.
The Nook really didn't have the performance or the memory to do any long pro recording without dropping some samples some time.
The more modern devices I use don't have the same libs.
Where is it not working?
Those patches all do different things, some of them are more performance or sampling rate or whatever.
Can you get audio to play a wav file using aplay?
I have a note that this can be used to test record.
(Your arecord could be named whatever.)
Code:
arecord --disable-resample --disable-channels --disable-format -r 44100 -c 1 -f S16_LE -t wav -d 5 /sdcard/test.wav
I'm not sure I understand how to use that line of code. AFAIK I don't have "arecord" anywhere and it does not work as either an ADB or shell command. Or is it preceded by "aplay"?
Anyway, I can certainly play a wav file using the player from ES File Manager. Playback works in all cases, including wav files generated from your Recorder app.
What does not work is any other sort of recording app like Skype or a market voice/sound recorder. I've tried all kinds, including one that actually shows waveforms on the screen. Not sure those squiggles corresponded with anything I was doing with the mic, though.
It is odd because I could swear that playback from some of the market recorder apps often sounds like there is a VERY slow playback of a voice, albeit low volume. Lots of other low-level noises too, sometimes rhythmic.
I remember reading in another posting about buffer issues with something like Skype but I'm not even there as I get no evidence of a recording whatever.
I've checked my asound.conf file, so that's not the issue.
Ha! A partial victory is mine
That business of the really slow playback sound when trying Skype and other recording apps kept nagging at me. Almost like recording at one rate and playing back at another. I have run afoul of that before when using Audacity to edit/merge some separate audiobook files. They all have to be the same rate or you get funny playback rate effects.
So...back to THE source:
"Modify /system/lib/hw/alsa.default.so"
Code:
[00002268] 02 00 00 00 // format
[0000226c] 01 00 00 00 // channels
[B][00002270] 40 1F 00 00 => 44 AC 00 00 // rate[/B]
This is supposed to be for general playback and I just assumed that when I did the USB Host package installation this modification was part of it because I didn't have any playback problems. And it was except for the last change. Now I can record a test call with Skype. Still trying to remember which voice recording apps I tried from the Market that gave a similar effect, but I imagine when I find them they will work also.
Renate, we all love you.
The aplay or a_play or alsa_play are all part of the ALSA utils, a separate package that you can download from somewhere.
I really like the new Nook Glow Plus screen, dislike the frame, the case, the no buttons, the no SD card, the no Bluetooth
and the fact that we are back to square one with USB host mode that doesn't work.
Ah yes
For me the NST remains ideal save for one remaining obstacle: the silly kludge to tame the audio volume after a reboot. Otherwise it does everything I could want in a reader along with some fringe benefits. It's become a truly amazing little device thanks to the many clever people (like you) who have steadily pushed the envelope.
Sent from my Nook Tablet CM 10.21