Discussion:
forcing two channel output
(too old to reply)
Andriy Gapon
2009-08-28 16:51:37 UTC
Permalink
Please see verbose dmesg here:
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.dmesg.txt

I get 4 pcm devices and I understand their functions as following:
0. digital hdmi
1. analog rear
2. analog front
3. digital

It seems that when I use dsp1 sound goes to 4 jacks at the rear.
But I have only a simple stereo system connected to only one output.

Should I do anything?
Can I tell sound driver and hardware to not bother and route sound to only one output?
Should I simply disable the unused jacks (with as=0) or maybe split them off to
separate pcms that I won't use?

Thank you in advance.
--
Andriy Gapon
Alexander Motin
2009-08-28 17:37:55 UTC
Permalink
Post by Andriy Gapon
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.dmesg.txt
0. digital hdmi
1. analog rear
2. analog front
3. digital
It seems that when I use dsp1 sound goes to 4 jacks at the rear.
Indeed. Your Codec is configured for 7.1 output, but snd_hda at this
moment does not support more then two channels. So for historical reason
it duplicates stereo output to every channel pair. I am going to look at
this again after 8.0 release.
Post by Andriy Gapon
But I have only a simple stereo system connected to only one output.
Should I do anything?
You can, if you want/need it.
Post by Andriy Gapon
Can I tell sound driver and hardware to not bother and route sound to only one output?
Should I simply disable the unused jacks (with as=0) or maybe split them off to
separate pcms that I won't use?
You can do whatever you like: disable them with as=0 or turn into many
separate devices with as=15, or even turn them into many additional inputs.
--
Alexander Motin
Andriy Gapon
2009-08-31 16:16:00 UTC
Permalink
Post by Alexander Motin
Indeed. Your Codec is configured for 7.1 output, but snd_hda at this
moment does not support more then two channels. So for historical reason
it duplicates stereo output to every channel pair. I am going to look at
this again after 8.0 release.
Cool! I hope you will have time for this.
It would be nice to auto-configure number of channels based on pin sense data.
--
Andriy Gapon
Andriy Gapon
2009-09-02 09:54:01 UTC
Permalink
Post by Alexander Motin
Post by Andriy Gapon
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.dmesg.txt
[snip]
Post by Alexander Motin
You can do whatever you like: disable them with as=0 or turn into many
separate devices with as=15, or even turn them into many additional inputs.
Alexandr,

so I thought that splitting them off into separate devices was a cool idea and I
did the following:
hint.hdac.1.cad0.nid21.config="as=15 seq=0"
hint.hdac.1.cad0.nid22.config="as=15 seq=0"
hint.hdac.1.cad0.nid23.config="as=15 seq=0"

Now I got 3 additional pcm/dsp devices.
New dmesg is available here:
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.2.dmesg.txt

New setup works but it is not without problems.
1. Output to dsp4 works perfectly.

2. Output to dsp6 doesn't work at all - a process writing to it gets stuck and
the following can be seen in system log:
pcm6: chn_write(): pcm6:virtual:dsp6.vp0: play interrupt timeout, channel dead
hdac1: timeout in reset

3. Output to dsp5 is the most strange. If I write to it after using dsp4 then it
works but sound goes to the same jack as for dsp4 (Black at Rear). If I write to
it after using dsp6 then it doesn't work just the same as dsp6 itself. The same
message go to the log (with "dsp6") in them.

I suspect that there could be some hardware quirk, but I think that the behavior
of dsp5 points to a possible driver issue.

Thank you for the help!
--
Andriy Gapon
Alexander Motin
2009-09-02 10:01:50 UTC
Permalink
Post by Andriy Gapon
Post by Alexander Motin
Post by Andriy Gapon
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.dmesg.txt
[snip]
Post by Alexander Motin
You can do whatever you like: disable them with as=0 or turn into many
separate devices with as=15, or even turn them into many additional inputs.
Alexandr,
so I thought that splitting them off into separate devices was a cool
hint.hdac.1.cad0.nid21.config="as=15 seq=0"
hint.hdac.1.cad0.nid22.config="as=15 seq=0"
hint.hdac.1.cad0.nid23.config="as=15 seq=0"
Now I got 3 additional pcm/dsp devices.
http://people.freebsd.org/~avg/ga-ma780g-ud3h/verbose.2.dmesg.txt
New setup works but it is not without problems.
1. Output to dsp4 works perfectly.
2. Output to dsp6 doesn't work at all - a process writing to it gets
pcm6: chn_write(): pcm6:virtual:dsp6.vp0: play interrupt timeout, channel dead
hdac1: timeout in reset
3. Output to dsp5 is the most strange. If I write to it after using dsp4
then it works but sound goes to the same jack as for dsp4 (Black at
Rear). If I write to it after using dsp6 then it doesn't work just the
same as dsp6 itself. The same message go to the log (with "dsp6") in them.
I suspect that there could be some hardware quirk, but I think that the
behavior of dsp5 points to a possible driver issue.
HDA controllers have limitations on number of data streams. You can see
it if boot with hw.snd.verbose=4. Usually there are 4 streams supported.
snd_hda allocates them statically now, one device - one data stream. So
you just could hit this limitation because of big number of devices. It
would be good to allocate streams dynamically on open, but it is not
implemented now.
--
Alexander Motin
Andriy Gapon
2009-09-02 15:31:56 UTC
Permalink
Post by Alexander Motin
HDA controllers have limitations on number of data streams. You can see
it if boot with hw.snd.verbose=4. Usually there are 4 streams supported.
snd_hda allocates them statically now, one device - one data stream. So
you just could hit this limitation because of big number of devices. It
would be good to allocate streams dynamically on open, but it is not
implemented now.
Is this something that could tweak locally - bump some limit or slightly change
some logic?
What should I look for in the source code?
--
Andriy Gapon
Alexander Motin
2009-09-02 15:53:49 UTC
Permalink
Post by Andriy Gapon
Post by Alexander Motin
HDA controllers have limitations on number of data streams. You can see
it if boot with hw.snd.verbose=4. Usually there are 4 streams supported.
snd_hda allocates them statically now, one device - one data stream. So
you just could hit this limitation because of big number of devices. It
would be good to allocate streams dynamically on open, but it is not
implemented now.
Is this something that could tweak locally - bump some limit or slightly change
some logic?
There is hardware limitation on number of streams. But logic is indeed
could be improved.
Post by Andriy Gapon
What should I look for in the source code?
Look for sc->num_iss, sc->num_oss and ch->sid.
--
Alexander Motin
Andriy Gapon
2009-09-04 16:10:34 UTC
Permalink
Post by Alexander Motin
There is hardware limitation on number of streams. But logic is indeed
could be improved.
So this is the line about HW capabilities?
hdac1: Streams: ISS=4 OSS=4 BSS=0
Post by Alexander Motin
Post by Andriy Gapon
What should I look for in the source code?
Look for sc->num_iss, sc->num_oss and ch->sid.
Thanks! But right now I am clueless about what can be done :(
--
Andriy Gapon
Alexander Motin
2009-09-04 16:34:56 UTC
Permalink
Post by Andriy Gapon
Post by Alexander Motin
There is hardware limitation on number of streams. But logic is indeed
could be improved.
So this is the line about HW capabilities?
hdac1: Streams: ISS=4 OSS=4 BSS=0
Yes. It means 4 input, 4 output and 0 bi-directional data streams
supported by this HDA controller.
--
Alexander Motin
Loading...