i have panasonic 4k tv th-dx625dx before update i have audio pass thorough option and easily ouput 5.1 surround from home theater . but after update this option is missing and unable to out 5.1 sound from home theater through HDMI sound out. and now i have only three option in audio setting 1) PCM 2) Auto 3) DD+ and in pCM and Auto only 2.1 sound out . i search every where but didn't find the solution. is any there app , or any adb command to restore this option . i find a code but dont know how to apply
Multimedia tunneling | Android Open Source Project
source.android.com
Create AudioTrack with HW A/V sync AudioAttributes.
The audio policy manager asks the hardware abstraction layer (HAL) for a device output that supports FLAG_HW_AV_SYNC, and creates an audio track directly connected to this output with no intermediate mixer.
AudioAttributes.Builder aab = new AudioAttributes.Builder();
aab.setUsage(AudioAttributes.USAGE_MEDIA);
aab.setContentType(AudioAttributes.CONTENT_TYPE_MOVIE);
aab.setFlag(AudioAttributes.FLAG_HW_AV_SYNC);
// or, for Android 11 or higher
new tunerConfig = TunerConfiguration(0, avSyncId);
aab.setTunerConfiguration(tunerConfig);
AudioAttributes aa = aab.build();
AudioTrack at = new AudioTrack(aa);
please any one help me . i will greatful to you
Related
this method can make sound in ubuntu on android.
this is a demo.a friend told me about this method.my device is new nexus 7(2013)
I will make a tutorial on xda-developers.
make a audio server on android.and ubuntu send the voice to android.the audio server play the voice.
this method is not real time,have delay.when play music,parse the music,it didn't parse immediately ,go on play about 10 seconds,and when resume ,the music is played from later seconds.
1.unzip the android file.7z, on android install the IRB.apk file.
run IRB,then sdcard have a directory jruby, audioserver.12.rb put here.
go to IRB,find scripts,select audioserver.12.rb,and execute
2.in ubuntu: install socat and perl,use "apt-get install socat " and "apt-get install perl"
3.unzip asoundrc.7z ,put .asoundrc into /root,
In .asoundrc uncomment this line:
pcm.!default "myfifo"
4.unzip audiofifoloop.1.tar,put audiofifoloop somewhere, To allow multiple ALSA applications, can configure
audiofifoloop. Find these two lines at the beginning:
$multi = 0;
$sleep = 1;
Set $multi to 1 and $sleep to 0.
make it executeable,and run it
then you can "aplay *.wav" in terminal,check is ok?
and can install smplayer to play music ,make sure the audio driver select alsa.
can play video in youtube but only html5.I played some but didn't smooth.
View attachment 2214234
View attachment audiofifoloop.1.tar
View attachment asoundrc.7z
I have a very simple method:
1.you can play musice use some player in android,at the same time in ubuntu termianl to do "alsactl store" to save the soundcard parameter.
2.close the player.and in ubuntu terminal do "alsactl restore" to resume the soundcard parameter.
3.then you can use "aplay *.wav" to play .
but this method does have more effect.I don't know.this only some point.
{ in android stock player or google player maybe couldn't ,you shoud find some other player,i used is chinese app 天天动听 } this method only sound in output like headphone,no sound in speaker.
reserve
Hello, i'm trying to get this to work.
I would like to know what image from sourceforge.net/projects/linuxonandroid/files/Ubuntu/ you used when testing this.
I have two problems, first when executing the audio server script it seems like i'm getting an error that I can't see that you get in your video when you execute it (but it's hard to tell in the video cause it's only visible for a second so i'm not sure) imgur.com/PckDNyC.png
and then when i execute aplay a.wav i get
shm_open() failed: Function not implemented
So i don't know where to start to fix this, need someone with understanding of how this works to help me out.
I followed the method and it worked fine... Does anyone know who to quit the audioserver when i am finished. i found nothing that would do it.. and had to restart phone.. any help would be appreciated.
Hello,
I hope that this is the right Forum section where I can ask my question. If it is the wrong place, I would be pleased if the Mods can place it in the right Forum.
So to my Problem now
I am trying for hours without any luck, so before I spend another day resolving the problem without solution, I am trying my luck here
I have an Android Device with rooted Omnirom kitkat that have no internal microphone built in. So I was hoping to connect any sort of usb microphone as default android audio input device that can be used for google voice for example.
I connected a Logitech webcam that has a built in microphone.
The usb audio device of the webcam get well recognized by the OS:
Code:
cat /proc/asound/cards
gives me
Code:
0 [SMDKI2S ]: SMDK-I2S - SMDK-I2S
SMDK-I2S
1 [U0x46d0x819 ]: USB-Audio - USB Device 0x46d:0x819
USB Device 0x46d:0x819 at usb-s5pv210-1.2, high speed
So the hardware device I would like to use, has the number 1 and it's name is U0x46d0x819.
Code:
cat /proc/asound/devices
gives me
Code:
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
32: [ 1] : control
33: : timer
56: [ 1- 0]: digital audio capture
So the mic is also detected as digital audio capture.
When I connect the webcam I get in /proc/asound/card1/ the following entries:
id
stream0
usbbus
usbid
usbmixer
usbmixer has the following content (some sort of controls):
Code:
USB Mixer: usb_id=0x046d0819, ctrlif=2, ctlerr=0
Card: USB Device 0x46d:0x819 at usb-s5pv210-1.2, high speed
Unit: 5
Control: name="Mic Capture Volume", index=0
Info: id=5, control=2, cmask=0x0, channels=1, type="S16"
Volume: min=768, max=6912, dBmin=300, dBmax=2700
Unit: 5
Control: name="Mic Capture Switch", index=0
Info: id=5, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
When connecting the Webcam I get under /dev/snd/ two new devices:
controlC1 and pcmC1D0c
When I try the mic with this app (link) where I can choose the usb audio device to test it, I get cristal clear recording! So it is working from the hardware point of view.
My issue now is how can I get that sound device configured to be the default mic for all apps in android?
I've read that it has to do with asound.conf or audio_policy.conf files in /system/etc, but I have absolutly no idea how they can be configured correctly.
May be it is a very basic question for all the modders and dev gurus out there, so thanks for any help for taking time pointing me to the right direction.:good:
Did you ever get this to work?
I have the same issue.
I created the /system/etc/asound.conf but the Android 4.4-r3 seems to be ignoring the config file.
Hey guys
I already asked this in some way over at Zenfone 2 sub forum but it might be better to post it here since it could be more CM-related than phone related.
At work we're developing an app which requires an x86 based processor to function properly. But we also need to use ALSA instead of tinyALSA related to various startup scripts required for that mentioned application and the application itself. Rewrite the whole parser is out of question due to the amount of work involved to port it over ARM platform.
Anyway we digged through the mixer settings of tinyALSA and came to the conclusion that it's not suitable for our app.
Currently I'm using the CyanogenMod 13 source code with ALSA lib and ALSA utils packages from Android x86 project (the Marshmallow-one of course). The build process is all fine and the binaries are usable inside an ADB shell but I'm not really able to use aplay for recording or playback of audio files.
Right now I'm stuck with the following error:
Code:
aplay: pcm_write:1684: write error: I/O error
I used "alsa_aplay /sdcard/Front_Center.wav -D hw:0,5 " to test the audio playback.
Some other problems occur when I want to use "alsa_ctl init", alsa_amixer can't load default mixer settings, "alsa_aplay -L" results in "NULL" output and so on.
Any suggestions on how to get audio capabilities working with true ALSA?
By the way: Our Zenfone 2 uses an Intel Atom Z3560 processor with rt5647-audio codec.
everything that has something to do with sound is simply not working (sometimes make my RN3SD restart)
1. phone calls : cant make any phone calls (when dialing the numbers, the screen show calling but cant connect, then restart. while reboot, the dialed number rang)
2.video (cant play any video with sound, including youtube. always show problem while trying to play)
3.music (cant play any music, alwasy show unsupported files)
QC TESTS :
1.play music on SD -> fail
2. Mic Speak loop -> fail : intenal applivation error and unable to access system space!)
3. Call test ;> fail
(java.lang.illegalargumenexception: invalid audio buffer size.
at android.media.audiorecord.audiobuffsizecheck(uidiorecord.java:674)
at android.media.audiorecord.<init>(audiorecord.java:374 and 271)
at com.longcheertel.cit.loopbackbaseactivity $record.run(loopbackbaseactivity.java:177)
at java.lang.thread.run(thread.java:818)
4. sub mic to speaker loopback ->fail (same as mic cpeak loop)
5. Headset plug in ;>fail
6. Headset key;> fail
7. Headset loopback-> fail
8. FM test -> fail
9. Headset plug out;>fail
APP tests
sound recorder :fail (check if another app is currently using the recording feature)
java:2894, 153, 1434, 102, 148, 5441, 738, 628, 674, 374, 271, 1288, 1265, 2884, and 8 more
soundabout does not help at all, no google setting
please if anyone can show me the right ways to solve this sound problem
About my RN3SD (KENZO):
android version : 6.0.1 MMB29M
MIUI version : MIUI Global 8.1 Stable 8.1.4.0 (MHOMDI)
baseband : -8976_GEN_PACK-1.7444 6.1.75478.1
kernel : 3.10.84-perf-g4b39ed7
PS : another thing i found, settings, additional settings, Headphone and audio effects ---> result is back to settings page
settings, sound and vibration, audio settings --> same, back to setting page
Did you try factory reset? Or even better fastboot flash latest ROM?
already did, no result
Welcome everyone to my RPi Media Center. This project is aimed at RPi 2 & RPi 3. Just a couple of things before we get started:
This project aims to explain how to set up a complete multimedia center (mediacenter), a game station and a download server. All in one. Any use aimed at hacking / stealing content with copyrights / third parties without express consent is prohibited. This project is based on a set of free software that can be easily found on the internet. This project has no lucrative purpose, its sole purpose is to teach and educate people the configuration and use of the different programs. This project was originally maintained by AikonCWD and has since stopped updating the project, so i am taking it on board to get it back up and running smoothly again. Obviously there will and are hick-ups/bugs. Thus for the mean time i will keep the project in Beta until we have a fully functional release.
For DCMA reasons Kodi will be supplied with NO EXTRA ADD-ONS. Please do not ask about them Look HERE if you are such inclined to do so. We do not condone such behavior.
Features:
-Multi-Media Center: Kodi 17.4 Krypton
-Game Center: RetroPie 4.0
-Game Streaming: Moonlight 2.2.1
-Download Center(s): Transmission & PyLoad
-Workstation: XFCE, FireFox & Chromium
-Tools: a bunch of extra tools
Needed Components:
-RPi 2 or PRi3
-MicroSD SDHC card (6gb or more recommended)
-MicroUSB Charger(5Volt and 3Amp)
-Protective enclosure for the RPi
-HDMI Cable
Recommended Extras:
-Power supply cable with the ON/OFF click button switch
-Heat sinks and fan to help keep the RPi Cooler
-Wireless Keyboard and Mouse Combo
-Xbox360 Controller (USB)
Pre-Configured for ease of use:
-Everything is pre-configured for a plug and play functionality. You shouldn't have to set anything up unless you have updated the files.
-Everything is in English, Originally translated from Spanish. (Please note i can support more languages if its needed in the future)
-Protocols SSH and SMB (Samba) are enabled (Username: root / Password: aikoncwd)
-Transmission setup for maximum torrent speeds (IT IS HIGHLY RECCOMENDED TO SET THIS UP WITH YOUR OWN Username and Password! Info on how to do that can be FOUND HERE)
-Access via Zeroconf enabled (For remote control via SmartPhone)
Whats Been Disabled for Performance Reasons:
-AirPlay
-Time Addon
-RSS news reader disabled
-Library Sharing Via UPnP
Okay Lets get started with the Installation, its pretty straight forward i have shrunk the .img as low as i can for the mean time. After Beta is done i will make more of an effort to shrink the file further.
Installation:
1. Download the preconfigured BETA-RPiMediaCenter.img image
2. Record the image on your microSD card :
-Windows : Use Win32DisKImager
-Linux :
Code:
sudo pv BETA-RPiMediaCenter.img | sudo dd of=disk2s1 bs=4M && sync
-MAC : Use the Apple-PiBakery program , thanks to jagarciavi
3. Insert your microSD with the .IMG that we loaded on to the SD-Card In the previous step
4. Plug in the power
5. The Raspberry will light up (Red/Green LED's on the mainboard) and the start up splash will show.
7. RPi Media Center will start automatically at boot every time.
8. (Optional) Verify that the partition occupies 100% of your microSD with the command:
Code:
df -h
MD5 CHECK-SUM:
Code:
921d4d195a795ddef00cf221160836f6
*Verify on windows with this TOOL
After Install
It is recommended that you set-up a static IP for your Media Center. It makes things a whole lot easier if you're using Moonlight and Transmission.
Which can be done by:
Opening Terminal and Typing
Code:
nano /etc/dhcpcd.conf
Then removing # From each of these lines:
Code:
interface eth0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8
And then setting up as to how you need it to. Its different for everyone.
Extras Install Guide:
Configure PyLoad (optional)
PyLoad is a program that allows you to transform your Raspberry into a direct download server . The PyLoad daemon is installed and configured, but it is disabled by default since not all users need to use it. If you want to enable and use PyLoad ... keep reading:
First of all we are going to configure the daemon so that it is auto-executed when turning on the Raspberry . Edit the cron auto-boot file with the command:
Code:
crontab -e
We are located at the bottom, locate the line @reboot pyLoadCore -daemonand remove the comment from the beginning, it should look like this: @reboot pyLoadCore --daemon( you have to put the 2 dashes in front of the word daemon ). Save the changes by pressing the keys: CTRL+ X, then Yand finallyIntro
You will have to restart your Raspberry to have the pyLoad daemon running, remember that Kodi turns on automatically, you must close it to return to the console.
We access PyLoad through a web browser using port 8000 , for example: http://192.168.1.100:8000
The default user is root and password root . In the top menu you can manage the user and change the password (recommended), just below you will find the configuration where you can edit the configuration, captchas plugins etc ... and add any premium account you have from the different hosts.
Overclocking (optional) DO SO AT YOUR OWN RISK!
I recommend enabling a bit of overclock , you'll get more fluency when moving through the Kodi menus and you'll noticeably boost performance when playing emulators. Your CPU will be able to perform faster calculations and access to ram memory or microSD disk will have lower response times.
Strongly recommend use some method of ventilation / cooling in order to avoid reaching 85C , since the RPI lower speed if it reaches that temperature
If you want you can run a benchmark (diagnostic) to test your overclock level, execute the following command:
Code:
curl [url]https://raw.githubusercontent.com/aikoncwd/rpi-benchmark/master/rpi-benchmark.sh[/url] | sudo bash
Raspberry Pi 3: Overclock settings
Edit your file nano /boot/config.txtand paste the following code, you can adjust the values to have more or less overclock:
Code:
force_turbo=0 #Enable cpu-overclock over 1300MHz (default 0)
avoid_pwm_pll=1 #Enable no-relative freq between cpu and gpu cores (default 0)
arm_freq=1300 #Frequency of ARM processor core in MHz (default 1200)
core_freq=550 #Frequency of GPU processor core in MHz (default 400)
over_voltage=6 #ARM/GPU voltage adjust, values over 6 voids warranty (default 0)
sdram_freq=575 #Frequency of SDRAM in MHz (default 450)
sdram_schmoo=0x02000020 #Set SDRAM schmoo to get more than 500MHz freq (default unset)
over_voltage_sdram_p=6 #SDRAM phy voltage adjust (default 0)
over_voltage_sdram_i=4 #SDRAM I/O voltage adjust (default 0)
over_voltage_sdram_c=4 #SDRAM controller voltage adjust (default 0)
gpu_mem=256 #GPU memory in MB. Memory split between ARM and GPU (default 64?)
gpu_freq=550 #Sets core_freq h264_freq isp_freq v3d_freq together (default 300)
v3d_freq=500 #Frequency of 3D block in MHz (default ?)
h264_freq=350 #Frequency of hardware video block in MHz (default ?)
dtparam=sd_overclock=75 #Clock in MHz to use for MMC micrSD (default 50)
dtparam=audio=on #Enables the onboard ALSA audio (always use this ON)
dtparam=spi=on #Enables the SPI interfaces (default OFF)
temp_limit=80 #Overheat protection. Disable overclock if SoC reaches this temp
initial_turbo=60 #Enables turbo mode from boot for the given value in seconds
hdmi_drive=2 #Normal HDMI mode. Sound will be sent if supported and enabled (default 2)
hdmi_ignore_cec_init=1 #Avoids bringing TV out of standby and channel switch when booting (default 0)
hdmi_ignore_cec=0 #Pretends CEC is not supported. No CEC functions will be supported (default 0)
hdmi_force_hotplug=1 #Pretends HDMI hotplug signal is asserted (default 0)
start_x=1 #Enable software decoding (MPEG-2, VC-1, VP6, VP8, Theora, etc. default 0)
overscan_scale=1 #Video Output will respect the overscan settings (default 1)
disable_overscan=0 #Disable overscan configuration. Set 1 if you see black lines on TV (default 0)
disable_splash=1 #Avoids the rainbow splash screen on boot (default 0)
avoid_warnings=1 #Disable warnings (Red=over-temperature ; Rainbow=under-voltage). (default 0)
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
Read the commands well, you may want to modify some to customize your image.
Raspberry Pi 2: Overclock settings
Edit your file nano /boot/config.txtand paste the following code, you can adjust the values to have more or less overclock:
gpu_mem=256
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
arm_freq=1100
core_freq=550
sdram_freq=483
over_voltage=6
over_voltage_sdram=2
temp_limit=70
force_turbo=0
initial_turbo=60
hdmi_drive=2
hdmi_ignore_cec=0
hdmi_ignore_cec_init=1
hdmi_ignore_hotplug=0
hdmi_force_hotplug=1
#disable_overscan=0
#overscan_scale=1
#overscan_left=49
#overscan_right=49
#overscan_top=29
#overscan_bottom=25
max_usb_current=1
dtparam=audio=on
dtparam=spi=on
You will find a script called bcmstat that allows you to accurately measure the hardware status of your Raspberry, you can see at what speed your CPU is going and at what temperature it is, for this it executes:
/root/bcmstat.sh
MoonLight
*Coming Soon*
DOWNLOADHERE
Download Option#2
Credits:
AikonCWD for his amazing original work
@Valkiry for continuing the development
BUGS
-Desktop/Emulationstation and wifi addons are currently not working.
Just use These commands for what you need when it goes to the terminal:
Desktop Environment:
Code:
startx
RetroPie:
Code:
emulationstation
Wifi
Code:
./RetroPie-Setup/retropie_packages.sh 829 gui
Bluetooth
Code:
./RetroPie-Setup/retropie_packages.sh 803 gui
I will fix these at a later date But for the mean time let me know how you go
Raspberry Pi Mediacenter
Hi. The previous version from AikonsCWD impressed. I was looking for ways to update KODI on Krypton, found your topic. Thanks for the update, but the scripts do not work, the command line falls out. Are there plans to upgrade from beta? I was looking for a way to cross Raspbyan XFCE and KODI, but really nothing happened. Do not tell me how to update or build your image? Thank you.
P.S. English is not my favorite language.
AlexFBG said:
Hi. The previous version from AikonsCWD impressed. I was looking for ways to update KODI on Krypton, found your topic. Thanks for the update, but the scripts do not work, the command line falls out. Are there plans to upgrade from beta? I was looking for a way to cross Raspbyan XFCE and KODI, but really nothing happened. Do not tell me how to update or build your image? Thank you.
P.S. English is not my favorite language.
Click to expand...
Click to collapse
Thanks for your feedback, I'm looking at updating it this year but I'm not sure when that will occur. The scripts don't work as stated. If you exit out of kodi you will be met with the command line which is where you run said commands to get them to work. Kodi is updating to 18 later this year so I might update the project to support 18 and the scripts till then this runs as intended.
Hello and thanks for the effort!
Although the image is working fine in my RP2+, I tried it into an RPB3+ and looks the OS is not booting.
Any idea what's happening? I tried default values and also overclock values, neither is making bootstrapping the OS.
kikobeats said:
Hello and thanks for the effort!
Although the image is working fine in my RP2+, I tried it into an RPB3+ and looks the OS is not booting.
Any idea what's happening? I tried default values and also overclock values, neither is making bootstrapping the OS.
Click to expand...
Click to collapse
It's not for 3b+.
Only RPi2/3/3B