Jump to content

Recommended Posts

Posted
  On 9/7/2017 at 3:11 PM, Da Alchemist said:

I have tested HDMI Audio on my Opi +2e, it is limited to 2 channels.(tested with speaker-test) Anyway it is good to know, that there is still developement on H5/H3 Boards.

Expand  

 

Can you test this patch if it brings multichannel support? http://sprunge.us/YDAN

 

Please note that I didn't do any test besides make sure it compiles. If it works, it is only starting point for implementing proper support since some hacks are made.

Posted
  On 9/8/2017 at 3:38 PM, jernej said:

Can you test this patch if it brings multichannel support? http://sprunge.us/YDAN

Expand  

For me it kills the audio completely:

# speaker-test -c2 -D hw:0

Channels count (2) not available for playbacks: Invalid argument

speaker-test 1.1.0

Playback device is hw:0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Setting of hwparams failed: Invalid argument

But at least resolution switching, rotation and mirroring works for all available resolutions after the CMA memory increase.

 

Edit: Forgot to check the dmesg, sorry, will try to repeat the test later.

Edit 2: Should channels_min be set to 8? Typo?

 		.stream_name = "Playback",
-		.channels_min = 2,
-		.channels_max = 2,
+		.channels_min = 8,
+		.channels_max = 8,
 		.rates = SNDRV_PCM_RATE_8000_192000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,

 

Posted
  On 9/8/2017 at 4:31 PM, zador.blood.stained said:

Typo?

Expand  

Yes, please try with 2. Uh, another issue - it will work with only even channel count (2, 4, 6, 8). Currently I'm not at my computer, so it will have to wait. But you can find line with "int lines =..." and round it up instead of round down.

Posted
  On 9/8/2017 at 4:40 PM, jernej said:

Uh, another issue - it will work with only even channel count (2, 4, 6, 8). Currently I'm not at my computer, so it will have to wait. But you can find line with "int lines =..." and round it up instead of round down.

Expand  

I don't think I have anything that can properly receive/decode multi-channel sound anyway.  And is this unrelated to odd/even channel count?

+	switch (hparms->channels) {
+	case 2:
+		conf0 = HDMI_AUD_CONF0_I2S_2CHANNEL_ENABLE;
+		break;
+	case 4:
+		conf0 = HDMI_AUD_CONF0_I2S_4CHANNEL_ENABLE;
+		break;
+	case 6:
+		conf0 = HDMI_AUD_CONF0_I2S_6CHANNEL_ENABLE;
+		break;
+	case 8:
+		conf0 = HDMI_AUD_CONF0_I2S_8CHANNEL_ENABLE;
+		break;
+	default:
+		dev_err(dev, "unsupported channels [%d]\n", hparms->channels);
+		return -EINVAL;
 	}

 

Posted
  On 9/8/2017 at 4:48 PM, zador.blood.stained said:

And is this unrelated to odd/even channel count?

Expand  

I really have no idea. It is the same issue as in I2S driver. However, that code is taken from Rockchip BSP driver, so it might be right.

 

Did you retry with 2 channels now?

Posted

Ok, something is happening:

ek@orangepiplus2e:~$ speaker-test -D hw:0 -c8

speaker-test 1.1.0

Playback device is hw:0
Stream parameters are 48000Hz, S16_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 32768
Period size range from 16 to 4096
Using max buffer size 32768
Periods = 4
was set period_size = 4096
was set buffer_size = 32768
 0 - Front Left
 1 - Front Right
 2 - Unknown
 3 - Unknown
 4 - Unknown
 5 - Unknown
 6 - Unknown
 7 - Unknown
Time per period = 23,245443

 but: there is no sound on any Channel , just silence.  I can here the relays clicking on my AVR and it shows me "Dolby Digital"  instead of  expected "Multichannel PCM" (that is what i get with my Hummingboard and Raspberry with modified Kernel)

 

I will build a new Kernel with "channels_min = 2" to check if there is sound with only 2 channels.

Posted

Compiling is running!

 

speaker-test gives 2 channel output with 2, 4, 6, 8 channels testing. There is only noise coming from fronts, channel enumeration is different on -c8, active channels are 0 and 7. (possible wrong channel mapping)

speaker-test is running without errors. My AVR only indicates the samplerate, no Dolby Digital anymore, but also no Multichannel PCM.

On RK3328 (z28) i found something similar, speaker-test without errors, sound only on the fronts (mapping ok). Kwiboo thinks that there are multichannel patches missing on ayufans kernel.

 

 

Posted
  On 9/8/2017 at 7:57 PM, Da Alchemist said:

On RK3328 (z28) i found something similar, speaker-test without errors, sound only on the fronts (mapping ok).

Expand  

I took latest code from Rockchip BSP kernel (almost same HDMI controller), so similar result is not surprising. Can you post dmesg?

 

I will take a look if something obvious is missing, but since I don't have soundbar or something similar, I can't promise anything.

Posted
  On 9/9/2017 at 4:33 PM, jernej said:

@zador.blood.stained You follow IRC log closely :). Did you try it out? I don't have access to OrangePi over this weekend...

Expand  

Trying to integrate the Mali kernel driver to build in-tree... For some reason it ignores MALI_PLATFORM define in the Makefile. so I'm trying to find a workaround without adding ugly hacks, or rather trying to make hacks less ugly.

Posted
  On 9/9/2017 at 5:24 PM, jernej said:

Maybe something like I had done for legacy kernel here https://github.com/jernejsk/linux/tree/master/drivers/gpu ?

Expand  

I believe I've found the docs that state that if Kbuild and Makefile are both present in a directory, then Kbuild is used and Makefile is simply ignored, and my experimentation confirms that. So I just need to clean up the Makefile and source it from Kbuild.

Posted

I got it running (more or less), but not without issues - very low subjective performance and kernel driver issues

  Reveal hidden contents

 

Edit: actually es2info crashes and es2gears is stuck not displaying anything, so "working" is relative. I wonder if this issue (or at least one of possible issues) is similar to previous issue on 2GB boards (I'm testing on OPI+2E)

Edit 2: same issue on OPi PC, so it's probably not related.

Posted
  On 9/10/2017 at 9:55 AM, jernej said:

Is performance any better?

Expand  

No. I tried playing with some armsoc settings (like disabling UMP_LOCK) and it still +/- the same, but since CPU DVFS is currently missing performance may be mostly CPU bound.

 

  On 9/10/2017 at 9:55 AM, jernej said:

Can you commit your patches so I can do few tests?

Expand  

Only Mali kernel driver patch was not pushed (I didn't make a package for libmali yet and copied and symlinked it by hand), and wouldn't it be easier to build it out of tree instead of rebuilding the whole kernel? I think about adding a lot of printk() in mali_gp_job_create to find at least where exactly it crashes, and I probably will be building it out of tree now too.

Posted

Also es2_info crashes without producing any kernel messages.

  Reveal hidden contents

 

Posted
  On 9/10/2017 at 10:16 AM, jernej said:

That userspace driver doesn't support ump.

Expand  

I know :) But I saw UMP related entries in Xorg.0.log and misread that it was enabled by default (now that I checked the man page again it is disabled by default)

 

  On 9/10/2017 at 10:16 AM, jernej said:

Did you disabled support for it while building?

Expand  

Kernel driver? It is disabled by default

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines