Skip to contentSkip to conversation

Reading from the output buffer

DISCUSSION Sean D'Epagnier 4 participants 4 messages Dec 3, 2006 – Dec 9, 2006 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi, I thought it would be cool to write a simple spectrum analizer to work with any alsa player, and display it with an ncurses interface. I have checked various alsa docs, and I can't figure out how to read the output buffer data back in.

Thanks,
Sean

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#2 lore raw

emu10k1 mute problems.

Hi,

I am wondering if there's a bugzilla or some place to drop a bugreport for my SBLive! (emu10k1)?

I have in my system 2 soundcards installed, an SBLive! emu10k1 ( 00:0e.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
Subsystem: Creative Labs SBLive! Player 5.1
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at ef20 [size=32]
Capabilities: [dc] Power Management version 1
)
and an Onboard VIA audio thinger (
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: ASUSTeK Computer Inc. Unknown device 810d
Flags: medium devsel, IRQ 20
I/O ports at 1000 [size=256]
Capabilities: [c0] Power Management version 2

)

on a gentoo 2.6.19-r1 kernel

Now they both are working but there's one thing that seems to be going wrong. Since it only happens on the SBLive (the via onboard works as it should) it must be a bug in the emu10k1 driver.

I use the following code to mute the left resp. right channels.

    snd_mixer_selem_set_playback_switch(elem, SND_MIXER_SCHN_FRONT_LEFT, 0);
    snd_mixer_selem_set_playback_switch(elem, 

SND_MIXER_SCHN_FRONT_RIGHT, 0);

However, when muting the left channel, both channels get muted. When muting the the right channel, none get muted. It's not just my app that shows this behavious, gkrellm-volume plugin for instance does the same thing (wrong).

Since there aren't really much mixers that do balance properly, there isn't much other volume controls I can test this with. I do however notice in alsamixer, that below the bar, it says [MM] or [OO] on the SBLive!, but with the Via, I get all possibilities done, including [MO] or [OM].

Thanks,

Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#3 lore raw

Re: emu10k1 mute problems.

Quoted 4 lines · Oliver Schinagl

Hi,

I am wondering if there's a bugzilla or some place to drop a bugreport for my SBLive! (emu10k1)?

Please report this but to the ALSA bug tracker.
https://bugtrack.alsa-project.org/alsa-bug/
See the link from
http://alsa-project.org/

I think the problem you describe is that the emu10k1 has a single mute control for both channels, so you do not have the left/right mute. You need to do a test first to find out if the is separate left/right mute or if they are separate. If there is only one, the "SND_MIXER_SCHN_FRONT_LEFT" controls both channels.
Maybe it would be sensible to change the alsa-lib api so either SND_MIXER_SCHN_FRONT_LEFT or SND_MIXER_SCHN_FRONT_RIGHT will control both left/right is the mute control is shared.

Quoted 23 lines

Now they both are working but there's one thing that seems to be going wrong. Since it only happens on the SBLive (the via onboard works as it should) it must be a bug in the emu10k1 driver.

I use the following code to mute the left resp. right channels.

    snd_mixer_selem_set_playback_switch(elem, SND_MIXER_SCHN_FRONT_LEFT, 0);
    snd_mixer_selem_set_playback_switch(elem, 

SND_MIXER_SCHN_FRONT_RIGHT, 0);

However, when muting the left channel, both channels get muted. When muting the the right channel, none get muted. It's not just my app that shows this behavious, gkrellm-volume plugin for instance does the same thing (wrong).

Since there aren't really much mixers that do balance properly, there isn't much other volume controls I can test this with. I do however notice in alsamixer, that below the bar, it says [MM] or [OO] on the SBLive!, but with the Via, I get all possibilities done, including [MO] or [OM].

Quoted 4 lines

Thanks,

Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#4 lore raw

Re: emu10k1 mute problems.

In reply to Oliver Schinagl
Quoted 28 lines · Oliver Schinagl

Hi,

I am wondering if there's a bugzilla or some place to drop a bugreport for my SBLive! (emu10k1)?

I have in my system 2 soundcards installed, an SBLive! emu10k1 ( 00:0e.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
Subsystem: Creative Labs SBLive! Player 5.1
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at ef20 [size=32]
Capabilities: [dc] Power Management version 1
)
and an Onboard VIA audio thinger (
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: ASUSTeK Computer Inc. Unknown device 810d
Flags: medium devsel, IRQ 20
I/O ports at 1000 [size=256]
Capabilities: [c0] Power Management version 2

)

on a gentoo 2.6.19-r1 kernel

Now they both are working but there's one thing that seems to be going wrong. Since it only happens on the SBLive (the via onboard works as it should) it must be a bug in the emu10k1 driver.

Quoted 5 lines

I use the following code to mute the left resp. right channels.

    snd_mixer_selem_set_playback_switch(elem, SND_MIXER_SCHN_FRONT_LEFT, 0);
    snd_mixer_selem_set_playback_switch(elem, 

SND_MIXER_SCHN_FRONT_RIGHT, 0);

Wrong code. You have to use snd_mixer_selem_set_playback_switch_all() if snd_mixer_selem_has_playback_switch_joined() flag is set. Perhaps, single channel operations should return an error in this case to show the broken part to application developers.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV