Hi,
I have installed debian 7.7 on an 8" tablet (CHUWI VX8 3G) baytrail atom
z3735g).
I'm using kernel 3.10.20 from original android installation (only binary
no source). I also tested upstream 3.19.0-rc1 with same results.
Below all info:
dmesg (relevant lines)
snd_intel_sst: INFO: ******** SST DRIVER loading.. Ver: 3.0.8
snd_byt_bl_rt5642: Baytrail Machine Driver byt_rt5642 registerd
byt_rt5642 AMCR0F28:00: snd-soc-dummy-dai <-> ssp-bt-cpu-dai mapping ok
byt_rt5642 AMCR0F28:00: snd-soc-dummy-dai <-> ssp-modem-cpu-dai mapping ok
snd_byt_bl_rt5642: snd_byt_mc_probe successful
cat /proc/asound/cards
0 [baytrailaudio ]: baytrailaudio - baytrailaudio
baytrailaudio
1 [IntelHDMI ]: IntelHDMI - IntelHDMI
ll /dev/snd/
total 0
drwxr-xr-x 2 root root 60 Dec 30 15:56 by-path
crw-rw---T+ 1 root audio 116, 6 Dec 30 15:56 comprC0D2
crw-rw---T+ 1 root audio 116, 12 Dec 30 15:56 controlC0
crw-rw---T+ 1 root audio 116, 14 Dec 30 15:56 controlC1
crw-rw---T+ 1 root audio 116, 11 Dec 30 15:56 hwC0D0
crw-rw---T+ 1 root audio 116, 10 Dec 30 15:56 pcmC0D0c
crw-rw---T+ 1 root audio 116, 9 Dec 30 15:56 pcmC0D0p
crw-rw---T+ 1 root audio 116, 8 Dec 30 15:56 pcmC0D1c
crw-rw---T+ 1 root audio 116, 7 Dec 30 15:56 pcmC0D1p
crw-rw---T+ 1 root audio 116, 5 Dec 30 15:56 pcmC0D3c
crw-rw---T+ 1 root audio 116, 4 Dec 30 15:56 pcmC0D3p
crw-rw---T+ 1 root audio 116, 3 Dec 30 15:56 pcmC0D4c
crw-rw---T+ 1 root audio 116, 2 Dec 30 15:56 pcmC0D4p
crw-rw---T+ 1 root audio 116, 13 Dec 30 15:56 pcmC1D0p
crw-rw---T+ 1 root audio 116, 1 Dec 30 15:56 seq
crw-rw---T+ 1 root audio 116, 33 Dec 30 15:56 timer
I copied firmware from android /system/etc/firmware to /lib/firmware/3.10.20
fw_sst_0f28.bin
aac_dec_0f28.bin
mp3_dec_0f28.bin
first test: alsa.conf asound.conf from android (tested also with default
pcm card 0)
aplay -l **** List of PLAYBACK Hardware Devices ****
card 0: baytrailaudio [baytrailaudio], device 0: Audio rt5640-aif1-0 []
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: baytrailaudio [baytrailaudio], device 1: Voice rt5640-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 3: BYT_BTSCO
snd-soc-dummy-dai-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 4: BYT_MODEM_MIXING
snd-soc-dummy-dai-4 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: IntelHDMI [IntelHDMI], device 0: IntelHDMI [IntelHDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
mplayer -novideo -v -af resample=48000 -ao alsa:device=hw=0.0 film.avi
...
uilding audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter resample
[resample] Changing sample rate to 48000Hz
[resample] Using integer processing and inexact frequecy conversion.
[resample] New filter designed up: 160 down: 147
[resample] Using integer processing and inexact frequecy conversion.
Trying preferred audio driver 'alsa', options 'device=hw=0.0'
alsa-init: requested format: 48000 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.25
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:0,0
alsa-init: pcm opened in blocking mode
alsa-init: got buffersize=96000
alsa-init: got period size 1500
alsa: 48000 Hz/2 channels/4 bpf/96000 bytes buffer/Signed 16 bit Little
Endian
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@xxxxxxxxxxxxxxxxx>
AO: Comment: under development
Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[resample] Using integer processing and inexact frequecy conversion.
[resample] Using integer processing and inexact frequecy conversion.
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module resample, old len = 0, new len = 98225
Increasing filtered audio buffer size from 0 to 98224
A: 0.0 (00.0) of 448.0 (07:28.0) 6.9%
(stops at 0.0 no sound, I must use ctrl-c to terminate mplayer)
dmesg:
snd_intel_sst: runtime_resume called
snd_intel_sst: FW Version 02.08.0a.05
snd_intel_sst: Build date Feb 18 2014 Time 10:11:36
snd_intel_sst: runtime_idle called
alsamixer
cannot load mixer controls: Inappropriate ioctl for device
second test: with alsa.conf minimal config
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: baytrailaudio [baytrailaudio], device 0: 1 []
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: baytrailaudio [baytrailaudio], device 1: Voice rt5640-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 3: BYT_BTSCO
snd-soc-dummy-dai-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 4: BYT_MODEM_MIXING
snd-soc-dummy-dai-4 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: IntelHDMI [IntelHDMI], device 0: IntelHDMI [IntelHDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
mplayer -novideo -v -af resample=48000 -ao alsa:device=hw=0.0 film.avi
...
Trying preferred audio driver 'alsa', options 'device=hw=0.0'
alsa-init: requested format: 48000 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.25
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:0,0
[AO_ALSA] alsa-lib: pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM hw:0,0
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa:device=hw=0.0'
Could not open/initialize audio device -> no sound.
Uninit audio filters...
[libaf] Removing filter resample
Uninit audio: ffmpeg
Audio: no sound
Freeing 0 unused audio chunks.
Video: no video
Freeing 0 unused video chunks.
alsamixer
cannot open mixer: Invalid argument
I also recompiled libasound but no solved
from android os (same kernel)
alsa_aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: baytrailaudio [baytrailaudio], device 0: 1 []
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: baytrailaudio [baytrailaudio], device 1: Voice rt5640-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 3: BYT_BTSCO
snd-soc-dummy-dai-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: baytrailaudio [baytrailaudio], device 4: BYT_MODEM_MIXING
snd-soc-dummy-dai-4 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: IntelHDMI [IntelHDMI], device 0: IntelHDMI [IntelHDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
alsa_aplay -vv /system/media/audio/ui/Undock.ogg
ALSA lib external/alsa-lib/src/conf.c:3437:(snd_config_hook_load) cannot
access file /system/usr/share/alsa/cards/aliases.conf
ALSA lib external/alsa-lib/src/pcm/pcm.c:2210:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.default
aplay: main:655: audio open error: No such file or directory
NOTE: alsa_aplay does not work but android apps sound work!
If I execute alsa_aplay, alsa_amixer, alsa_ctl binary of android in
debian with linker and libraries from android they crash with
segmentation fault:
ec 31 15:18:23 tablet kernel: [ 6040.442155] alsa_amixer[6342]: segfault
at 90 ip 00000000f767032d sp 00000000ff80f784 error 4 in
libc.so[f75eb000+c1000]
I don't know how go ahead. Is it possible test only driver without alsa
lib and alsa.conf?
Thanks
#
# ALSA library configuration file
#
# pre-load the configuration files
@hooks [
{
func load
files [
"/etc/asound.conf"
"~/.asoundrc"
]
errors false
}
]
# load card-specific configuration files (on request)
cards.@hooks [
{
func load
files [
{
@func concat
strings [
{ @func datadir }
"/cards/aliases.conf"
]
}
]
}
{
func load_for_all_cards
files [
{
@func concat
strings [
{ @func datadir }
"/cards/"
{ @func private_string }
".conf"
]
}
]
errors false
}
]
#
# defaults
#
# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
#
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0
defaults.pcm.subdevice 0
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
# truncate files via file or tee PCM
defaults.pcm.file_format "raw"
defaults.pcm.file_truncate true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0
#
# PCM interface
#
# redirect to load-on-demand extended pcm definitions
pcm.cards cards.pcm
pcm.default cards.pcm.default
pcm.front cards.pcm.front
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
pcm.side cards.pcm.side
pcm.surround40 cards.pcm.surround40
pcm.surround41 cards.pcm.surround41
pcm.surround50 cards.pcm.surround50
pcm.surround51 cards.pcm.surround51
pcm.surround71 cards.pcm.surround71
pcm.iec958 cards.pcm.iec958
pcm.spdif iec958
pcm.hdmi cards.pcm.hdmi
pcm.dmix cards.pcm.dmix
pcm.dsnoop cards.pcm.dsnoop
pcm.modem cards.pcm.modem
pcm.phoneline cards.pcm.phoneline
pcm.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
]
default {
@func refer
name defaults.pcm.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
]
default {
@func refer
name defaults.pcm.device
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
}
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
show {
@func refer
name defaults.namehint.extended
}
description "Direct hardware device without any conversions"
}
}
pcm.plughw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
]
default {
@func refer
name defaults.pcm.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
]
default {
@func refer
name defaults.pcm.device
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
}
}
type plug
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
hint {
show {
@func refer
name defaults.namehint.extended
}
description "Hardware device with all software conversions"
}
}
pcm.plug {
@args [ SLAVE ]
@args.SLAVE {
type string
}
type plug
slave.pcm $SLAVE
}
pcm.shm {
@args [ SOCKET PCM ]
@args.SOCKET {
type string
}
@args.PCM {
type string
}
type shm
server $SOCKET
pcm $PCM
}
pcm.tee {
@args [ SLAVE FILE FORMAT ]
@args.SLAVE {
type string
}
@args.FILE {
type string
}
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
}
}
type file
slave.pcm $SLAVE
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
}
}
pcm.file {
@args [ FILE FORMAT ]
@args.FILE {
type string
}
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
}
}
type file
slave.pcm null
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
}
}
pcm.null {
type null
hint {
show {
@func refer
name defaults.namehint.basic
}
description "Discard all samples (playback) or generate zero samples (capture)"
}
}
#
# Control interface
#
ctl.default {
type hw
card {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
]
default {
@func refer
name defaults.ctl.card
}
}
}
ctl.hw {
@args [ CARD ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
]
default {
@func refer
name defaults.ctl.card
}
}
}
type hw
card $CARD
}
ctl.shm {
@args [ SOCKET CTL ]
@args.SOCKET {
type string
}
@args.CTL {
type string
}
type shm
server $SOCKET
ctl $CTL
}
#
# RawMidi interface
#
rawmidi.default {
type hw
card {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
]
default {
@func refer
name defaults.rawmidi.card
}
}
device {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
]
default {
@func refer
name defaults.rawmidi.device
}
}
}
rawmidi.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
]
default {
@func refer
name defaults.rawmidi.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
]
default {
@func refer
name defaults.rawmidi.device
}
}
}
@args.SUBDEV {
type integer
default -1
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
description "Direct rawmidi driver device"
device $DEV
}
}
rawmidi.virtual {
@args [ MERGE ]
@args.MERGE {
type string
default 1
}
type virtual
merge $MERGE
}
#
# Sequencer interface
#
seq.default {
type hw
}
seq.hw {
type hw
}
#
# HwDep interface
#
hwdep.default {
type hw
card {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
]
default {
@func refer
name defaults.hwdep.card
}
}
device {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
]
default {
@func refer
name defaults.hwdep.device
}
}
}
hwdep.hw {
@args [ CARD DEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
]
default {
@func refer
name defaults.hwdep.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
]
default {
@func refer
name defaults.hwdep.device
}
}
}
type hw
card $CARD
device $DEV
}
#
# Timer interface
#
timer_query.default {
type hw
}
timer_query.hw {
type hw
}
timer.default {
type hw
class {
@func refer
name defaults.timer.class
}
sclass {
@func refer
name defaults.timer.sclass
}
card {
@func refer
name defaults.timer.card
}
device {
@func refer
name defaults.timer.device
}
subdevice {
@func refer
name defaults.timer.subdevice
}
hint.description "Default direct hardware timer device"
}
timer.hw {
@args [ CLASS SCLASS CARD DEV SUBDEV ]
@args.CLASS {
type integer
default {
@func refer
name defaults.timer.class
}
}
@args.SCLASS {
type integer
default {
@func refer
name defaults.timer.sclass
}
}
@args.CARD {
type string
default {
@func refer
name defaults.timer.card
}
}
@args.DEV {
type integer
default {
@func refer
name defaults.timer.device
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.timer.subdevice
}
}
type hw
class $CLASS
sclass $SCLASS
card $CARD
device $DEV
subdevice $SUBDEV
}
#alsa.conf minimal configuration
ctl.hw {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD #with 0 alsamixer work, with $CARD alsamixer lend to invalid argument
}
ctl.default = ctl.hw
# Android ALSA configuration file
#
# Mixer Devices
#
ctl.AndroidPlayback {
type hw
card 0
device 0
}
ctl.AndroidPlayback_Widi {
type hw
card Loopback
device 0
}
ctl.AndroidPlayback_Widi-Loopback {
type hw
card Loopback
device 0
}
ctl.AndroidRecord {
type hw
card 0
device 0
}
ctl.AndroidPlayback_HDMIAudio {
type hw
card 0
device 0
}
#
# Playback Devices
#
pcm.AndroidPlayback {
type plug
slave.pcm "both"
}
pcm.AndroidPlayback_Speaker_normal {
type plug
slave.pcm "speaker"
}
pcm.AndroidPlayback_Headset_normal {
type plug
slave.pcm "headphone"
}
pcm.both {
type hooks
slave.pcm {
type hw
card 0
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{name "Speaker Mux Playback Route" value [1 1]}
{name "Mode Playback Route" value 0}
{name "Playback Switch" value 1}
]
}
}
pcm.speaker {
type hooks
slave.pcm {
type hw
card 0
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{name "Speaker Mux Playback Route" value [1 1]}
{name "Mode Playback Route" value 0}
{name "Playback Switch" value 0}
]
}
}
pcm.headphone {
type hooks
slave.pcm {
type hw
card 0
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{name "Speaker Mux Playback Route" value [0 0]}
{name "Mode Playback Route" value 0}
{name "Playback Switch" value 1}
]
}
}
#
# HDMI routing
#
pcm.HDMIAudio {
type hw
card 0
device 0
}
pcm.AndroidPlayback_HDMIAudio {
type linear
slave {
pcm HDMIAudio
format S24_LE
}
}
pcm.AndroidPlayback_HDMIAudio_normal {
type linear
slave {
pcm HDMIAudio
format S24_LE
}
}
#
# WIDI routing
#
pcm.AndroidPlayback_Widi{
type hw
card Loopback
device 0
subdevice 0
}
pcm.AndroidPlayback_Widi-Loopback{
type plug
slave.pcm "loopback_sink"
}
pcm.AndroidPlayback_Widi-Loopback_normal{
type plug
slave.pcm "loopback_sink"
}
pcm.loopback_sink {
type hw
card Loopback
device 0
subdevice 0
}
#
# Capture device
#
pcm.AndroidCapture {
type hooks
slave.pcm {
type hw
card 0
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{name "DMIC12 Capture Route" value 1}
{name "DMIC34 Capture Route" value 1}
{name "Txpath1 Capture Route" value 0}
{name "Txpath2 Capture Route" value 2}
{name "Txpath3 Capture Route" value 6}
{name "Txpath4 Capture Route" value 6}
]
}
}
#
# WIDI
#
pcm.loopback_src {
type hw
card Loopback
device 1
subdevice 0
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user