Re: USB speakers, no sound

2019-08-13 Thread Raf Czlonka
On Sun, Aug 11, 2019 at 03:14:25PM BST, Doug Moss wrote:
> 
> To make sure I understand correctly / and possible help others in future 
> reading thread:
> (OpenBSD 6.5, amd64)
> 
> /etc/rc.conf.local
> sndiod_flags="-f rsnd/1"
> (This tells the sndiod daemon to configure the first _raw_ audio device = 
> 'audio1' in dmesg = 'rsnd/1',
 ^
Second - remember, the devices are 0[zero]-indexed.

> and this becomes exposed as the first sndiod device 'snd/0')

Cheers,

Raf



Re: USB speakers, no sound

2019-08-11 Thread Doug Moss
On Sunday, August 11, 2019, 3:19:52 AM EDT, Alexandre Ratchov wrote:
>
>Could you try setting:
>
>sndiod_flags="-frsnd/0 -frsnd1"
>
>then restart sndiod, then run:
>
>aucat -f snd/1 -i song.wav

Apologies - somehow the cycles of restarting/powering off and on - it seems to 
be working fine now.

To make sure I understand correctly / and possible help others in future 
reading thread:
(OpenBSD 6.5, amd64)

/etc/rc.conf.local
sndiod_flags="-f rsnd/1"
(This tells the sndiod daemon to configure the first _raw_ audio device = 
'audio1' in dmesg = 'rsnd/1',
and this becomes exposed as the first sndiod device 'snd/0')

aucat -f snd/0 -i song.wav
(Plays song.wav through the first sndiod exposed device, 'snd/0' = 'rsnd/1' )
This works

aucat -f rsnd/0 -i song.wav
(Plays song.wav through the _raw_ sound device 'audio0' in dmesg, the onboard 
Intel Audio)
This works (note, 'rsnd/0' is not exposed as any 'snd/N' available device)

aucat -f rsnd/1 -i song.wav
(Plays song.wav through the _raw_ sound device 'audio1' in dmesg, in my case 
the USB speakers)
This works

aucat -f snd/1 -i song.wav
(fails because with sndiod_flags -f rsnd1, then sndiod only exposes one device,
'snd/0' = the _raw_ sound device 'audio1' = 'rsnd/1' , and there is no 'snd/1')

aucat -i song.wav
(Plays song.wav through the default sndiod exposed device 'snd/0' = 'rsnd/1' )
This works

Hopefully I have that all correct.

I have no idea why it didn't work when I first tried this yesterday when I 
first hooked up the USB speakers.



Re: USB speakers, no sound

2019-08-11 Thread Doug Moss


>> no sound from USB speakers
>> 
>> dmesg:
>> azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi
>> azalia0: codecs: Realtek ALC888, Intel/0x2805, using Realtek ALC888
>> audio0 at azalia0
>> ...
>> uhub5 at uhub3 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" 
>> rev 2.00/0.00 addr 2
>> uaudio0 at uhub5 port 7 configuration 1 interface 1 "Ten X Technology, Inc. 
>> USB AUDIO" rev 1.10/1.87 addr 3
>> uaudio0: class v1, full-speed, sync, channels: 2 play, 0 rec, 3 ctls
>> audio1 at uaudio0
>> uhidev1 at uhub5 port 7 configuration 1 interface 2 "Ten X Technology, Inc. 
>> USB AUDIO" rev 1.10/1.87 addr 3
>> uhidev1: iclass 3/0
>> uhid0 at uhidev1: input=1, output=0, feature=0
>> 
>> 
>> configuration:
>> /etc/rc.conf.local:
>> sndiod_flags="-m play -f rsnd/1 -f rsnd/0"
>> 
>> 
>> audioctl -f /dev/audioctl0:
>> name=azalia0
>> mode=play,record
>> pause=0
>> active=0
>> nblks=2
>> blksz=4416
>> rate=44100
>> encoding=s16le
>> play.channels=2
>> play.bytes=0
>> play.errors=0
>> record.channels=2
>> record.bytes=0
>> record.errors=0
>> 
>> 
>> audioctl -f /dev/audioctl1:
>> name=uaudio0
>> mode=
>> pause=0
>> active=0
>> nblks=2
>> blksz=960
>> rate=48000
>> encoding=s16le
>> play.channels=2
>> play.bytes=0
>> play.errors=0
>> record.channels=2
>> record.bytes=0
>> record.errors=0
>> 
>> aucat -f rsnd/0 -i song.wav
>>   plays fine
>> 
>> aucat -f rsnd/1 -i song.wav
>>   generates nothing

>Hi,
>
>Does it exit or it just plays silence?

aucat does not fail or exit, just that there is no sound output - just silence


>If it plays silence, while it's playing could you do:
>
>audioctl -f /dev/audioctl1; sleep 1; audioctl -f /dev/audioctl1
>
>and send me the output.

obsd$ audioctl -f /dev/audioctl1; sleep 1; audioctl -f /dev/audioctl1
name=uaudio0
mode=play
pause=0
active=1
nblks=2
blksz=1020
rate=48000
encoding=s16le
play.channels=2
play.bytes=681360
play.errors=0
record.channels=2
record.bytes=0
record.errors=0
name=uaudio0
mode=play
pause=0
active=1
nblks=2
blksz=1020
rate=48000
encoding=s16le
play.channels=2
play.bytes=873120
play.errors=0
record.channels=2
record.bytes=0
record.errors=0


The rate is not what I would expect - the input is a WAV file, from a CD with 
rate of 44100 Hz


>Then could you send me the output of:
>
>mixerctl -f /dev/mixer1

obsd$ mixerctl -f /dev/mixer1
outputs.play=254,254
outputs.play_mute=off 
record.enable=sysctl 


I notice that the speakers also have buttons on the front to control volume
which I think show up as the interface device:
 uhidev1 at uhub5 port 7 configuration 1 interface 2
Does that mess things up or interfere in any way?




Re: USB speakers, no sound

2019-08-10 Thread Alexandre Ratchov
On Sat, Aug 10, 2019 at 07:58:14PM +, Doug Moss wrote:
> no sound from USB speakers
> 
> dmesg:
> azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi
> azalia0: codecs: Realtek ALC888, Intel/0x2805, using Realtek ALC888
> audio0 at azalia0
> ...
> uhub5 at uhub3 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" 
> rev 2.00/0.00 addr 2
> uaudio0 at uhub5 port 7 configuration 1 interface 1 "Ten X Technology, Inc. 
> USB AUDIO" rev 1.10/1.87 addr 3
> uaudio0: class v1, full-speed, sync, channels: 2 play, 0 rec, 3 ctls
> audio1 at uaudio0
> uhidev1 at uhub5 port 7 configuration 1 interface 2 "Ten X Technology, Inc. 
> USB AUDIO" rev 1.10/1.87 addr 3
> uhidev1: iclass 3/0
> uhid0 at uhidev1: input=1, output=0, feature=0
> 
> 
> configuration:
> /etc/rc.conf.local:
> sndiod_flags="-m play -f rsnd/1 -f rsnd/0"
> 
> 
> audioctl -f /dev/audioctl0:
> name=azalia0
> mode=play,record
> pause=0
> active=0
> nblks=2
> blksz=4416
> rate=44100
> encoding=s16le
> play.channels=2
> play.bytes=0
> play.errors=0
> record.channels=2
> record.bytes=0
> record.errors=0
> 
> 
> audioctl -f /dev/audioctl1:
> name=uaudio0
> mode=
> pause=0
> active=0
> nblks=2
> blksz=960
> rate=48000
> encoding=s16le
> play.channels=2
> play.bytes=0
> play.errors=0
> record.channels=2
> record.bytes=0
> record.errors=0
> 
> aucat -f rsnd/0 -i song.wav
>   plays fine
> 
> aucat -f rsnd/1 -i song.wav
>   generates nothing
> 

Hi,

Does it exit or it just plays silence? If it plays silence, while it's
playing could you do:

audioctl -f /dev/audioctl1; sleep 1; audioctl -f /dev/audioctl1

and send me the output. Then could you send me the output of:

mixerctl -f /dev/mixer1



USB speakers, no sound

2019-08-10 Thread Doug Moss
no sound from USB speakers

dmesg:
azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi
azalia0: codecs: Realtek ALC888, Intel/0x2805, using Realtek ALC888
audio0 at azalia0
...
uhub5 at uhub3 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 
2.00/0.00 addr 2
uaudio0 at uhub5 port 7 configuration 1 interface 1 "Ten X Technology, Inc. USB 
AUDIO" rev 1.10/1.87 addr 3
uaudio0: class v1, full-speed, sync, channels: 2 play, 0 rec, 3 ctls
audio1 at uaudio0
uhidev1 at uhub5 port 7 configuration 1 interface 2 "Ten X Technology, Inc. USB 
AUDIO" rev 1.10/1.87 addr 3
uhidev1: iclass 3/0
uhid0 at uhidev1: input=1, output=0, feature=0


configuration:
/etc/rc.conf.local:
sndiod_flags="-m play -f rsnd/1 -f rsnd/0"


audioctl -f /dev/audioctl0:
name=azalia0
mode=play,record
pause=0
active=0
nblks=2
blksz=4416
rate=44100
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0


audioctl -f /dev/audioctl1:
name=uaudio0
mode=
pause=0
active=0
nblks=2
blksz=960
rate=48000
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0

aucat -f rsnd/0 -i song.wav
  plays fine

aucat -f rsnd/1 -i song.wav
  generates nothing


Any thoughts/advice are welcome
Thanks