Hello, I still cannot play audio from spdif.
I found old approach which is change device to 0(by make analog device disable).
And I found lots of comment which said disable device from bios settings.
Is there any way to set priority of devices?
I cannot set spdif digital out's priority higher than analog because both of them is supported by realtek ALC audio cards.
If I have to make digital out to card0 device0, one way is patch kernel source. But I think it is very dirty way.
I already tried to modify HAL sources asound.conf but it is not working.
Last way is disable my realtek aound and buy spdif only ddc card.
Any ideas about this problem?
Thank you for reading. I will attach information about my devices.
-----------------------------------------------------------------------------
x86_64:/ # dmesg | grep HDA
[ 1.152481] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input3
[ 1.152503] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input4
[ 1.152523] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input5
[ 1.152558] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 1.152609] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 1.152649] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 1.152677] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 1.152720] input: HDA Intel PCH HDMI as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
x86_64:/ # alsa_aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
x86_64:/ # alsa_amixer -c 0 sset 'Speaker Digital' on
amixer: Unable to find simple control 'Speaker Digital',0
1|x86_64:/ # alsa_amixer controls
numid=34,iface=CARD,name='Front Headphone Jack'
numid=28,iface=CARD,name='Front Mic Jack'
numid=44,iface=CARD,name='HDMI Jack'
numid=30,iface=CARD,name='Line Jack'
numid=33,iface=CARD,name='Line Out CLFE Jack'
numid=31,iface=CARD,name='Line Out Front Jack'
numid=32,iface=CARD,name='Line Out Surround Jack'
numid=29,iface=CARD,name='Rear Mic Jack'
numid=35,iface=CARD,name='SPDIF Phantom Jack'
numid=27,iface=MIXER,name='Master Playback Switch'
numid=26,iface=MIXER,name='Master Playback Volume'
numid=10,iface=MIXER,name='Headphone Playback Switch'
numid=9,iface=MIXER,name='Headphone Playback Volume'
numid=18,iface=MIXER,name='Front Mic Boost Volume'
numid=2,iface=MIXER,name='Front Playback Switch'
numid=1,iface=MIXER,name='Front Playback Volume'
numid=4,iface=MIXER,name='Surround Playback Switch'
numid=3,iface=MIXER,name='Surround Playback Volume'
numid=7,iface=MIXER,name='Center Playback Switch'
numid=5,iface=MIXER,name='Center Playback Volume'
numid=8,iface=MIXER,name='LFE Playback Switch'
numid=6,iface=MIXER,name='LFE Playback Volume'
numid=20,iface=MIXER,name='Line Boost Volume'
numid=15,iface=MIXER,name='Capture Switch'
numid=17,iface=MIXER,name='Capture Switch',index=1
numid=14,iface=MIXER,name='Capture Volume'
numid=16,iface=MIXER,name='Capture Volume',index=1
numid=25,iface=MIXER,name='IEC958 Default PCM Playback Switch'
numid=40,iface=MIXER,name='IEC958 Playback Con Mask'
numid=21,iface=MIXER,name='IEC958 Playback Con Mask',index=16
numid=41,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=22,iface=MIXER,name='IEC958 Playback Pro Mask',index=16
numid=42,iface=MIXER,name='IEC958 Playback Default'
numid=23,iface=MIXER,name='IEC958 Playback Default',index=16
numid=43,iface=MIXER,name='IEC958 Playback Switch'
numid=24,iface=MIXER,name='IEC958 Playback Switch',index=16
numid=11,iface=MIXER,name='Auto-Mute Mode'
numid=12,iface=MIXER,name='Input Source'
numid=13,iface=MIXER,name='Input Source',index=1
numid=19,iface=MIXER,name='Rear Mic Boost Volume'
numid=37,iface=PCM,name='Capture Channel Map'
numid=36,iface=PCM,name='Playback Channel Map'
numid=38,iface=PCM,name='Playback Channel Map',device=1
numid=39,iface=PCM,name='Capture Channel Map',device=2
numid=45,iface=PCM,name='Playback Channel Map',device=3
x86_64:/ # alsa_amixer cset numid=35 values=on
amixer: Control default element write error: Operation not permitted
1|x86_64:/ # alsa
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_ucm
acct/ init.android_x86_64.rc sbin/
bugreports init.environ.rc sdcard/
cache/ init.rc seapp_contexts
charger init.superuser.rc selinux_version
config/ init.usb.configfs.rc sepolicy
d/ init.usb.rc service_contexts
data/ init.zygote32.rc storage/
default.prop init.zygote64_32.rc sys/
dev/ lib/ system/
etc/ mnt/ ueventd.android_x86_64.rc
file_contexts.bin oem/ ueventd.rc
fstab.android_x86_64 proc/ vendor/
init property_contexts
1|x86_64:/ # alsa_ucm
acct/ init.android_x86_64.rc sbin/
bugreports init.environ.rc sdcard/
cache/ init.rc seapp_contexts
charger init.superuser.rc selinux_version
config/ init.usb.configfs.rc sepolicy
d/ init.usb.rc service_contexts
data/ init.zygote32.rc storage/
default.prop init.zygote64_32.rc sys/
dev/ lib/ system/
etc/ mnt/ ueventd.android_x86_64.rc
file_contexts.bin oem/ ueventd.rc
fstab.android_x86_64 proc/ vendor/
init property_contexts
1|x86_64:/ # alsa_ucm -?
alsa_ucm: invalid option -- ?
Try 'alsa_ucm --help' for more information.
1|x86_64:/ # alsa_ucm --help
Usage: alsa_ucm <options> [command]
Available options:
-h,--help this help
-c,--card NAME open card NAME
-i,--interactive interactive mode
-b,--batch FILE batch mode (use '-' for the stdin input)
-n,--no-open do not open first card found
Available commands:
open NAME open card NAME
reset reset sound card to default state
reload reload configuration
listcards list available cards
list IDENTIFIER list command
get IDENTIFIER get string value
geti IDENTIFIER get integer value
set IDENTIFIER VALUE set string value
h,help help
q,quit quit
ALSA lib external/alsa-lib/src/ucm/parser.c:1142:(uc_mgr_scan_master_configs) error: could not scan directory /system/usr/share/alsa/ucm: No such file or directory
alsa_ucm: unable to obtain card list: No such file or directory
1|x86_64:/ # alsa_ucm -c 0
ALSA lib external/alsa-lib/src/ucm/utils.c:67:(uc_mgr_config_load) could not open configuration file /system/usr/share/alsa/ucm/0/0.conf
ALSA lib external/alsa-lib/src/ucm/parser.c:1082:(load_master_config) error: could not parse configuration for card 0
ALSA lib external/alsa-lib/src/ucm/main.c:665:(snd_use_case_mgr_open) error: failed to import 0 use case configuration -2
alsa_ucm: error failed to open sound card 0: No such file or directory
1|x86_64:/ # alsa_ucm listcards
ALSA lib external/alsa-lib/src/ucm/parser.c:1142:(uc_mgr_scan_master_configs) error: could not scan directory /system/usr/share/alsa/ucm: No such file or directory
alsa_ucm: unable to obtain card list: No such file or directory
1|x86_64:/ # alsa
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_ctl
alsactl: Specify command...
x86_64:/ # alsa_ctl -?
alsa_ctl: invalid option -- ?
Usage: alsactl <options> command
Available global options:
-h,--help this help
-d,--debug debug mode
-v,--version print version of this program
Available state options:
-f,--file # configuration file (default /var/lib/alsa/asound.state)
-F,--force try to restore the matching controls as much as possible
(default mode)
-g,--ignore ignore 'No soundcards found' error
-P,--pedantic do not restore mismatching controls (old default)
-I,--no-init-fallback
don't initialize even if restore fails
-r,--runstate # save restore and init state to this file (only errors)
default settings is 'no file set'
-R,--remove remove runstate file at first, otherwise append errors
Available init options:
-E,--env #=# set environment variable for init phase (NAME=VALUE)
-i,--initfile # main configuation file for init phase (default /system/usr/share/alsa/init/00main)
Available commands:
store <card #> save current driver setup for one or each soundcards
to configuration file
restore <card #> load current driver setup for one or each soundcards
from configuration file
init <card #> initialize driver to a default state
names <card #> dump information about all the known present (sub-)devices
into configuration file (DEPRECATED)
1|x86_64:/ # alsa_ctl init 0
Found hardware: "HDA-Intel" "Realtek Generic" "HDA:10ec1168,10438723,00100003 HDA:8086280b,80860101,00100000" "0x1043" "0x8723"
Hardware is initialized using a generic method
99|x86_64:/ # alsa_ctl
alsactl: Specify command...
x86_64:/ # alsa_ctl -?
alsa_ctl: invalid option -- ?
Usage: alsactl <options> command
Available global options:
-h,--help this help
-d,--debug debug mode
-v,--version print version of this program
Available state options:
-f,--file # configuration file (default /var/lib/alsa/asound.state)
-F,--force try to restore the matching controls as much as possible
(default mode)
-g,--ignore ignore 'No soundcards found' error
-P,--pedantic do not restore mismatching controls (old default)
-I,--no-init-fallback
don't initialize even if restore fails
-r,--runstate # save restore and init state to this file (only errors)
default settings is 'no file set'
-R,--remove remove runstate file at first, otherwise append errors
Available init options:
-E,--env #=# set environment variable for init phase (NAME=VALUE)
-i,--initfile # main configuation file for init phase (default /system/usr/share/alsa/init/00main)
Available commands:
store <card #> save current driver setup for one or each soundcards
to configuration file
restore <card #> load current driver setup for one or each soundcards
from configuration file
init <card #> initialize driver to a default state
names <card #> dump information about all the known present (sub-)devices
into configuration file (DEPRECATED)
1|x86_64:/ # alsa
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_
alsa_amixer alsa_aplay alsa_ctl alsa_ucm
1|x86_64:/ # alsa_aplay
acct/ init.android_x86_64.rc sbin/
bugreports init.environ.rc sdcard/
cache/ init.rc seapp_contexts
charger init.superuser.rc selinux_version
config/ init.usb.configfs.rc sepolicy
d/ init.usb.rc service_contexts
data/ init.zygote32.rc storage/
default.prop init.zygote64_32.rc sys/
dev/ lib/ system/
etc/ mnt/ ueventd.android_x86_64.rc
file_contexts.bin oem/ ueventd.rc
fstab.android_x86_64 proc/ vendor/
init property_contexts
1|x86_64:/ # alsa_aplay -?
alsa_aplay: invalid option -- ?
Try `aplay --help' for more information.
1|x86_64:/ # alsa_aplay --help
Usage: aplay [OPTION]... [FILE]...
-h, --help help
--version print current version
-l, --list-devices list all soundcards and digital audio devices
-L, --list-pcms list device names
-D, --device=NAME select PCM by name
-q, --quiet quiet mode
-t, --file-type TYPE file type (voc, wav, raw or au)
-c, --channels=# channels
-f, --format=FORMAT sample format (case insensitive)
-r, --rate=# sample rate
-d, --duration=# interrupt after # seconds
-M, --mmap mmap stream
-N, --nonblock nonblocking mode
-F, --period-time=# distance between interrupts is # microseconds
-B, --buffer-time=# buffer duration is # microseconds
--period-size=# distance between interrupts is # frames
--buffer-size=# buffer duration is # frames
-A, --avail-min=# min available space for wakeup is # microseconds
-R, --start-delay=# delay for automatic PCM start is # microseconds
(relative to buffer size if <= 0)
-T, --stop-delay=# delay for automatic PCM stop is # microseconds from xrun
-v, --verbose show PCM structure and setup (accumulative)
-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)
-I, --separate-channels one file for each channel
--disable-resample disable automatic rate resample
--disable-channels disable automatic channel conversions
--disable-format disable automatic format conversions
--disable-softvol disable software volume control (softvol)
--test-position test ring buffer position
--test-coef=# test coeficient for ring buffer position (default 8)
expression for validation is: coef * (buffer_size / 2)
--test-nowait do not wait for ring buffer - eats whole CPU
--max-file-time=# start another output file when the old file has recorded
for this many seconds
--process-id-file write the process ID here
--use-strftime apply the strftime facility to the output file name
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
Some of these may not be available on selected hardware
The availabled format shortcuts are:
-f cd (16 bit little endian, 44100, stereo)
-f cdr (16 bit big endian, 44100, stereo)
-f dat (16 bit little endian, 48000, stereo)
x86_64:/ # alsa_aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
HDA Intel PCH, Generic Analog
Default Audio Device
x86_64:/ # alsa_aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
x86_64:/ # alsa_aplay -D 3
ALSA lib external/alsa-lib/src/pcm/pcm.c:2208:(snd_pcm_open_noupdate) Unknown PCM 3
aplay: main:662: audio open error: No such file or directory
1|x86_64:/ # alsa_aplay -D 3
2017년 7월 1일 토요일 오후 6시 32분 46초 UTC+9, YoungJoon Lee 님의 말: