On Wed, Sep 03, 2025 at 07:37:37AM +0200, Jan Stary wrote:
> On Aug 29 08:36:53, [email protected] wrote:
> > Hello misc@. I am looking for suggestions on how to debug an audio
> > issue.  Specifically, audio sometimes will work, but only as follows:
> > (a) approximately 50% of the time, audio will produce sound for one
> > second or less; (b) approximately 50% of the time audio will produce
> > no sound at all; and (c) only very occasionally audio will produce
> > sound for up to 30 seconds, then stop.  In either of the scenarios,
> > there is no "lock-up" of either sndiod or the system as a whole.
> 
> Running sndiod with -d might help you here.
> 
>       # rcctl stop sndiod
>       # script -c 'sndiod -ddd' sndiod.log
> 
> and see what it says when the sound stops.

Thanks, I'll try that as soon as I have access to the machine.
> 
> > There are two audio cards on this system, one discrete at azalia1/
> > audio0 and one integrated at azalia3/audio1; I am primarily interested
> > in the first, which is the discrete card. (I did briefly test the
> > integrated card, which produced no sound.)
> > 
> > The output of "# cat > /dev/audio0 < /dev/zero &" followed by
> > "# audioctl play.{bytes,errors}" produces identical output whether
> > run in an X session or in a console session.
> 
> X vs console should make no difference.
> That command will not produce any sound of course.
> 
> > The output of one such
> > session run in X, which appears to be one of the ~1 second instances,
> > is included below, along with a complete dmesg. I have also included
> > the dmesg parts strictly related to azalia(4).
> 
> How do you tell it lasts 1 second when it play silence?
> 
> > however:
> > https://marc.info/?l=openbsd-misc&m=161443644931577&w=2
> > https://www.reddit.com/r/openbsd/comments/mybklx/keep_losing_audio_with_azalia_on_current/
> > https://marc.info/?l=openbsd-tech&m=171588776531605&w=2
> > Apparently a patch was committed, but that patch does not seem
> > to work for my hardware, in which case msi would need to be
> > permenantly disabled.
> > 
> > All suggestions are appreciated.
> > 
> > 
> > obsd# cat > /dev/audio0 < /dev/zero &
> > [1] 14320
> > obsd# audioctl play.{bytes,errors}
> > play.bytes=138240
> > play.errors=0
> > obsd# audioctl play.{bytes,errors}
> > play.bytes=138240
> > play.errors=0
> > obsd# audioctl play.{bytes,errors}
> > play.bytes=138240
> > play.errors=0
> > obsd# kill %1
> > obsd# fg %1
> > cat > /dev/audio0 < /dev/zero
> > Terminated
> 
> The number of bytes played should be rising as it keeps playing.
> So let's see what sndiod -d hjas to say.
> 
> Also, try with something that actualy plays sound.
> 
> $ doas pkg_add sox
> $ play -n synth gain -6
> 
> > # dmesg/azalia snippet:
> > 
> > obsd# dmesg | grep azalia
> > azalia0 at pci3 dev 0 function 1 vendor "ATI", unknown product 0xab30
> > rev 0x00: msi
> > azalia0: no supported codecs
> > azalia1 at pci7 dev 0 function 0 vendor "Creative Labs", unknown product
> > 0x0012 rev 0x01: msi
> > azalia1: codecs: Creative Labs/0x0011
> > audio0 at azalia1
> 
> This is what you are using by default: the "unknown product".
> 
> > azalia2 at pci13 dev 0 function 1 "ATI Renoir HD Audio" rev 0x00: msi
> > azalia2: no supported codecs
> > azalia3 at pci13 dev 0 function 6 "AMD 17h/1xh HD Audio" rev 0x00: msi
> > azalia3: codecs: Realtek ALC1220
> > audio1 at azalia3
> 
> I would trust this one more. What happens
> when you plug out the external Creative Labs card
> and use the internal AMD HD Audio?

The integrated card works fine. I have been working with someone
off-list and there is a known issue with the msi interrupt line,
so we are pursuing that avenue presently.

Thanks for your observations/suggestions.
> 
> (The dmesg you post seems to have wrapped lines,
> maybe your mail client does it.)
> 
> 
>       Jan
> 

Reply via email to