cfrockit
Senior Member
- Dec 26, 2010
- 627
- 191
In an attempt to better understand why some things just don't work on this device I've been reviewing the logs that can be viewed with Android System Info.
The following was repeated over and over again in all of the log files I captured and reviewed:
While I haven't observed any issues with the sound, programming errors just drive me crazy. Researching these outputs led me to this Google groups discussion regarding "problems with ALSA". I determined the device didn't even have a "asound.conf" that should have been located in /system/etc and contain the missing hardware configuration details.
From reviewing the default config file and the posted code samples, I constructed the following "asound.conf" file for this device and placed it in /system/etc
Here are the log results after adding /system/etc/asound.conf
What if anything this means I don't know but to me no more "Unknown" statements!
The following was repeated over and over again in all of the log files I captured and reviewed:
Code:
[FONT=Courier New]D/ALSAModule(1985)open called for devices 00000002 in mode 0...
E/ALSALib (1985)external/alsa-lib/src/pcm/pcm.c:2203:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback_Speaker_normal
E/ALSALib (1985)external/alsa-lib/src/pcm/pcm.c:2203:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback_Speaker
E/ALSALib (1985)external/alsa-lib/src/pcm/pcm.c:2203:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback
D/ (1985)[external/alsa-lib/src/pcm/pcm_hw.c]:snd_pcm_hw_prepare
I/ALSAModule(1985)Initialized ALSA PLAYBACK device default[/FONT]
From reviewing the default config file and the posted code samples, I constructed the following "asound.conf" file for this device and placed it in /system/etc
Code:
##
## Mixer Devices
##
ctl.AndroidPlayback {
type hw
card 1
device 0
}
ctl.AndroidCapture {
type hw
card 1
device 0
}
##
## Playback Devices
##
pcm.AndroidPlayback {
type hw
card 1
device 0
}
pcm.AndroidPlayback_Speaker {
type hw
card 1
device 0
}
pcm.AndroidPlayback_Speaker_normal {
type hw
card 1
device 0
}
pcm.AndroidOut_Headset {
type hw
}
pcm.AndroidOut_Earpiece {
type hw
}
# No bluetooth available. Send output to the bit bucket.
pcm.AndroidOut_Bluetooth {
type null
}
pcm.AndroidOut_Bluetooth-A2DP {
type null
}
##
## Recording device
##
pcm.AndroidIn {
type hw
}
Code:
D/ALSAModule(1985)open called for devices 00000002 in mode 0...
D/ (1985)[external/alsa-lib/src/pcm/pcm_hw.c]:snd_pcm_hw_prepare
I/ALSAModule(1985)Initialized ALSA PLAYBACK device default