10-26-2018, 05:46 AM
The problem of "es8316" is quite tough and can not be solved by only modifying "*.dts" or "kernel-config".
For example, your proposal is,
> So the question - how to sort the 1-0010 | gpio4-0 | ff880000.i2s conflict ?
If you fix it, you can surely see some improvement.
However, this kind of modification alone is not enough,
and only the effect of reducing errors from the "boot-log" is obtained.
In order for "es8316" to work correctly, both "dts" and "*.c source-code" modifications are necessary,
and the modification is more extensive (perhaps, more than you think).
"original-kernel (4.19.0-1073-ayufan)"
https://github.com/ayufan-rock64/linux-m..._arm64.deb
"original-kernel" with "modified-dts" (your proposal, perhaps what you tried to do)
"my-kernel"
Of course, all the sounds "es8316" / "hdmi" / "spdif" are working.
However, sadly, "mainline-kernel" has not yet implemented "video-accelerator" (mpp related),
it is not fun even if only the sound comes out.
So, I usually do not use "mainline-kernel".
For example, your proposal is,
> So the question - how to sort the 1-0010 | gpio4-0 | ff880000.i2s conflict ?
If you fix it, you can surely see some improvement.
However, this kind of modification alone is not enough,
and only the effect of reducing errors from the "boot-log" is obtained.
In order for "es8316" to work correctly, both "dts" and "*.c source-code" modifications are necessary,
and the modification is more extensive (perhaps, more than you think).
"original-kernel (4.19.0-1073-ayufan)"
https://github.com/ayufan-rock64/linux-m..._arm64.deb
Code:
$ uname -a
Linux Rock64 4.19.0-1073-ayufan-ga6e013135a6e #1 SMP PREEMPT Tue Oct 23 09:19:54 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
[ 16.057479] rockchip-pinctrl pinctrl: pin gpio4-0 already requested by ff880000.i2s; cannot claim for 1-0010
[ 16.059298] rockchip-pinctrl pinctrl: pin-128 (1-0010) status -22
[ 16.060034] rockchip-pinctrl pinctrl: could not request pin 128 (gpio4-0) from group i2s-8ch-mclk on device rockchip-pinctrl
[ 16.061258] es8316 1-0010: Error applying setting, reverse things back
[ 16.062080] es8316: probe of 1-0010 failed with error -22
$ aplay -l
aplay: device_list:270: no soundcards found...
$ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
$ pactl list sinks
Sink #0
State: IDLE
Name: auto_null
Description: Dummy Output
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 10
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: auto_null.monitor
Latency: 2213366 usec, configured 2000000 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Dummy Output"
device.class = "abstract"
device.icon_name = "audio-card"
Formats:
pcm
"original-kernel" with "modified-dts" (your proposal, perhaps what you tried to do)
Code:
$ uname -a
Linux Rock64 4.19.0-1073-ayufan-ga6e013135a6e #1 SMP PREEMPT Tue Oct 23 09:19:54 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
[ 10.538432] asoc-simple-card es8316-sound: ASoC: no source widget found for MICBIAS1
[ 10.539291] asoc-simple-card es8316-sound: ASoC: Failed to add route MICBIAS1 -> direct -> Mic Jack
[ 10.540228] asoc-simple-card es8316-sound: ASoC: no sink widget found for IN1P
[ 10.540973] asoc-simple-card es8316-sound: ASoC: Failed to add route Mic Jack -> direct -> IN1P
[ 11.978401] es8316 1-0010: ASoC: Differential Mux DAPM update failed: -6
[ 11.979565] es8316 1-0010: ASoC: Digital Mic Mux DAPM update failed: -6
[ 13.149657] es8316 1-0010: ASoC: Differential Mux DAPM update failed: -6
[ 13.151011] es8316 1-0010: ASoC: Digital Mic Mux DAPM update failed: -6
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
[ 280.461123] es8316 1-0010: No sysclk provided
[ 280.464960] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
...
[ 280.507795] es8316 1-0010: No sysclk provided
[ 280.511685] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
card 0: rockchipes8316c [rockchip,es8316-codec], device 0: ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
$ aplay -L
[ 347.616981] es8316 1-0010: No sysclk provided
[ 347.620827] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
...
[ 347.663448] es8316 1-0010: No sysclk provided
[ 347.667337] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=rockchipes8316c
rockchip,es8316-codec,
Default Audio Device
dmix:CARD=rockchipes8316c,DEV=0
rockchip,es8316-codec,
Direct sample mixing device
dsnoop:CARD=rockchipes8316c,DEV=0
rockchip,es8316-codec,
Direct sample snooping device
hw:CARD=rockchipes8316c,DEV=0
rockchip,es8316-codec,
Direct hardware device without any conversions
plughw:CARD=rockchipes8316c,DEV=0
rockchip,es8316-codec,
Hardware device with all software conversions
$ pactl list sinks
[ 129.097332] es8316 1-0010: No sysclk provided
[ 129.097841] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
...
[ 129.110316] es8316 1-0010: No sysclk provided
[ 129.110825] es8316 1-0010: ASoC: can't open codec ES8316 HiFi: -22
Sink #0
State: IDLE
Name: auto_null
Description: Dummy Output
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 11
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: auto_null.monitor
Latency: 2216568 usec, configured 2000000 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Dummy Output"
device.class = "abstract"
device.icon_name = "audio-card"
Formats:
pcm
"my-kernel"
Code:
$ uname -a
Linux Rock64 4.19.0-1073-ayufan-ga6e013135a6e #1 SMP PREEMPT Tue Oct 23 20:05:55 JST 2018 aarch64 aarch64 aarch64 GNU/Linux
[ 3.683845] asoc-simple-card es8316-sound: ES8316 HiFi <-> ff890000.i2s mapping ok
[ 3.684589] asoc-simple-card es8316-sound: ASoC: no DMI vendor name!
[ 3.691358] asoc-simple-card spdif-sound: dit-hifi <-> ff870000.spdif mapping ok
[ 3.692034] asoc-simple-card spdif-sound: ASoC: no DMI vendor name!
[ 4.254556] asoc-simple-card hdmi-sound: i2s-hifi <-> ff8a0000.i2s mapping ok
[ 4.255369] asoc-simple-card hdmi-sound: ASoC: no DMI vendor name!
[ 4.500561] ALSA device list:
[ 4.500561] #0: ROCKCHIP,ES8316
[ 4.500561] #1: ROCKCHIP,SPDIF
[ 4.500561] #2: ROCKCHIP,HDMI
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ROCKCHIPES8316 [ROCKCHIP,ES8316], device 0: ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ROCKCHIPSPDIF [ROCKCHIP,SPDIF], device 0: ff870000.spdif-dit-hifi dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: ROCKCHIPHDMI [ROCKCHIP,HDMI], device 0: ff8a0000.i2s-i2s-hifi i2s-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
$ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=ROCKCHIPES8316
ROCKCHIP,ES8316,
Default Audio Device
sysdefault:CARD=ROCKCHIPES8316
ROCKCHIP,ES8316,
Default Audio Device
dmix:CARD=ROCKCHIPES8316,DEV=0
ROCKCHIP,ES8316,
Direct sample mixing device
dsnoop:CARD=ROCKCHIPES8316,DEV=0
ROCKCHIP,ES8316,
Direct sample snooping device
hw:CARD=ROCKCHIPES8316,DEV=0
ROCKCHIP,ES8316,
Direct hardware device without any conversions
plughw:CARD=ROCKCHIPES8316,DEV=0
ROCKCHIP,ES8316,
Hardware device with all software conversions
default:CARD=ROCKCHIPSPDIF
ROCKCHIP,SPDIF,
Default Audio Device
sysdefault:CARD=ROCKCHIPSPDIF
ROCKCHIP,SPDIF,
Default Audio Device
dmix:CARD=ROCKCHIPSPDIF,DEV=0
ROCKCHIP,SPDIF,
Direct sample mixing device
dsnoop:CARD=ROCKCHIPSPDIF,DEV=0
ROCKCHIP,SPDIF,
Direct sample snooping device
hw:CARD=ROCKCHIPSPDIF,DEV=0
ROCKCHIP,SPDIF,
Direct hardware device without any conversions
plughw:CARD=ROCKCHIPSPDIF,DEV=0
ROCKCHIP,SPDIF,
Hardware device with all software conversions
default:CARD=ROCKCHIPHDMI
ROCKCHIP,HDMI,
Default Audio Device
sysdefault:CARD=ROCKCHIPHDMI
ROCKCHIP,HDMI,
Default Audio Device
dmix:CARD=ROCKCHIPHDMI,DEV=0
ROCKCHIP,HDMI,
Direct sample mixing device
dsnoop:CARD=ROCKCHIPHDMI,DEV=0
ROCKCHIP,HDMI,
Direct sample snooping device
hw:CARD=ROCKCHIPHDMI,DEV=0
ROCKCHIP,HDMI,
Direct hardware device without any conversions
plughw:CARD=ROCKCHIPHDMI,DEV=0
ROCKCHIP,HDMI,
Hardware device with all software conversions
$ pactl list sinks
Sink #0
State: IDLE
Name: alsa_output.platform-es8316-sound.stereo-fallback
Description: Built-in Audio Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.platform-es8316-sound.stereo-fallback.monitor
Latency: 1896804 usec, configured 2000000 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "ff890000.i2s-ES8316 HiFi ES8316 HiFi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "ROCKCHIP,ES8316"
alsa.long_card_name = "ROCKCHIP,ES8316"
device.bus_path = "platform-es8316-sound"
sysfs.path = "/devices/platform/es8316-sound/sound/card0"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "stereo-fallback"
device.profile.description = "Stereo"
device.description = "Built-in Audio Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output-headphones: Headphones (priority: 9000)
Active Port: analog-output-headphones
Formats:
pcm
Sink #1
State: IDLE
Name: alsa_output.platform-hdmi-sound.stereo-fallback
Description: Built-in Audio Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.platform-hdmi-sound.stereo-fallback.monitor
Latency: 1949733 usec, configured 2000000 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "ff8a0000.i2s-i2s-hifi i2s-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "ROCKCHIP,HDMI"
alsa.long_card_name = "ROCKCHIP,HDMI"
device.bus_path = "platform-hdmi-sound"
sysfs.path = "/devices/platform/hdmi-sound/sound/card2"
device.form_factor = "internal"
device.string = "hw:2"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "stereo-fallback"
device.profile.description = "Stereo"
device.description = "Built-in Audio Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output: Analog Output (priority: 9900)
Active Port: analog-output
Formats:
pcm
Sink #2
State: IDLE
Name: alsa_output.platform-spdif-sound.stereo-fallback
Description: Built-in Audio Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 8
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.platform-spdif-sound.stereo-fallback.monitor
Latency: 1985337 usec, configured 2000000 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "ff870000.spdif-dit-hifi dit-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "ROCKCHIP,SPDIF"
alsa.long_card_name = "ROCKCHIP,SPDIF"
device.bus_path = "platform-spdif-sound"
sysfs.path = "/devices/platform/spdif-sound/sound/card1"
device.form_factor = "internal"
device.string = "hw:1"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "stereo-fallback"
device.profile.description = "Stereo"
device.description = "Built-in Audio Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output: Analog Output (priority: 9900)
Active Port: analog-output
Formats:
pcm
Of course, all the sounds "es8316" / "hdmi" / "spdif" are working.
However, sadly, "mainline-kernel" has not yet implemented "video-accelerator" (mpp related),
it is not fun even if only the sound comes out.
So, I usually do not use "mainline-kernel".