You are not logged in.

#1 2012-06-15 14:30:20

Prowler
Member
Registered: 2011-05-16
Posts: 16

Beep the internal speakers, while there are external plugged?

How can I use the "beep" command and have the laptop beep even if there are speakers connected through the audio port, but switched off? Want to be able to set the beep to inform me of certain events, even when the external speakers are off (I keep them always plugged in though).
Any ideas?

Last edited by Prowler (2012-06-15 14:30:31)

Offline

#2 2012-06-15 14:45:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,442

Re: Beep the internal speakers, while there are external plugged?

You need to provide just a bit more information.  Not all audio systems are created equal.  It may be possible, but you need to at least tell us the make and the model.

Beyond that:

what is the audio chip?  lspci -nn
What audio codecs are there on your system?
Are you using Pulseaudio?  Are you willing to?
Are you using Jack? Are you willing to?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#3 2012-06-15 15:00:35

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,754

Re: Beep the internal speakers, while there are external plugged?

AFAIK, the binary 'beep' can only use the motherboard buzzer/speaker.  You may also be able to use the echo alert sequence.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-06-15 15:12:55

Prowler
Member
Registered: 2011-05-16
Posts: 16

Re: Beep the internal speakers, while there are external plugged?

ewaller wrote:

You need to provide just a bit more information.  Not all audio systems are created equal.  It may be possible, but you need to at least tell us the make and the model.

Beyond that:

what is the audio chip?  lspci -nn
What audio codecs are there on your system?
Are you using Pulseaudio?  Are you willing to?
Are you using Jack? Are you willing to?

lspci -nn | grep -i audio
00:1b.0 Audio device [0403]: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio [8086:3b56] (rev 05)

audio codes (providing loaded modules, I think that are "codecs")
http://pastebin.com/raw.php?i=bqdwghQs

Card: HDA Intel
Chip: Conexant CX20585
on that card, in alsamixer I have: Master, PCM, Beep, Capture, Analog Mic Boost
Using pulseaudio with alsa, controlling through pavucontrol usually.

Wouldn't think it would be that system specific, I believe it acts the same way, prefering external speakers,  on every linux?

@alphaniner
that is my problem, when there are external speakers plugged in, it just produces the beep sound through the speakers.

Last edited by Prowler (2012-06-15 15:14:37)

Offline

#5 2012-06-15 15:19:00

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,754

Re: Beep the internal speakers, while there are external plugged?

Are you actually using the /usr/bin/beep binary from the 'beep' package in extra?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2012-06-15 15:39:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,442

Re: Beep the internal speakers, while there are external plugged?

Prowler wrote:

Wouldn't think it would be that system specific, I believe it acts the same way, prefering external speakers,  on every linux?

On some systems, plugging in an audio jack physically disconnects the internal speakers and route the audio through the headphone jack.

On other system (Intel HD Audio, for one) the insertion of a jack is sensed in software, and the HDA chip then determines to which of the hardware audio codecs to send the audio data.  These can include Internal stereo output, Headphone output, Line Output, HDMI output, Optical or Coaxial multichannel output, etc... Some Intel HDA systems are even used to implement "WinModems" using a dedicated codec.

The loaded module list is not quite what I was looking for, but it is close.

Look at the directory /proc/asound/card0.  You should have some files called  'codec#0', 'codec#2', ...  For educational purposes, take a look through them.  I am mostly concerned about codec#0, its contents should have some bearing on the controls in pavucontrol.

I am not in front of my system right now, so I cannot experiment.  I think it is possible to convince Pulseaudio to send different streams to different sinks.  If not, I am sure jack will.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#7 2012-06-15 16:06:29

Prowler
Member
Registered: 2011-05-16
Posts: 16

Re: Beep the internal speakers, while there are external plugged?

@alphaniner
yes - "extra/beep 1.3-2 [installed]" ; whereis beep:  "beep: /usr/bin/beep"

@ewaller

Yeah, noticed the hdmi plugging doesn't reroute the audio output by itself, as HD Intel does.
Here is the codec#0 file, took a look through it, but don't know how it can come into use. Using pavucontrol, don't see a way to reroute any stream to hardware speaker while the external one is still plugged in. roll


EDIT: installed acpi, and here is the difference in the /proc/asound/card0/codec#0 file before and after unplugging the jack:

diff plugged unplugged
118c118
<   Pin-ctls: 0xc0: OUT HP
---
>   Pin-ctls: 0x00:
189c189
<   Pin-ctls: 0x00:
---
>   Pin-ctls: 0x40: OUT

The problem is, I cant write anything to the file, even after getting permissions. But hey, its still a step forwards, now all left is simulate a jack-out event (though that approach poses another problem - if we simulate jack-out to get the beep out of the laptop, all audio is rerouted there too. That is workaroundable though ^^

Last edited by Prowler (2012-06-15 21:40:41)

Offline

#8 2012-06-19 17:53:12

Prowler
Member
Registered: 2011-05-16
Posts: 16

Re: Beep the internal speakers, while there are external plugged?

No ideas? hmm

Offline

#9 2012-06-20 20:22:23

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,015

Re: Beep the internal speakers, while there are external plugged?

I found that OSS treated my hardware differently than Alsa.  I have found alsa to do what I would normally expect it to do, and it works with all sound applications.  With OSS, I had to manually control the headphone jack separately from the speakers.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#10 2012-06-21 03:13:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,442

Re: Beep the internal speakers, while there are external plugged?

Prowler,
I think you might want to take a look at jack.  It is a lot of overhead, and the configuration is a pain, but it is the best thing I've seen for sending sound from arbitrary locations to different outputs.  The concept is kind of like a virtual patch board.  Check out the wiki entry.

I've seen your posts and I think you can handle it, otherwise I'd not make the suggestion.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#11 2012-06-21 19:13:23

Prowler
Member
Registered: 2011-05-16
Posts: 16

Re: Beep the internal speakers, while there are external plugged?

ewaller wrote:

Prowler,
I think you might want to take a look at jack.  It is a lot of overhead, and the configuration is a pain, but it is the best thing I've seen for sending sound from arbitrary locations to different outputs.  The concept is kind of like a virtual patch board.  Check out the wiki entry.

I've seen your posts and I think you can handle it, otherwise I'd not make the suggestion.

Installed "jack" and "qjackctl" and set QMMP to use jack plugin. It plays fine, and using the qjackctl kit, tried changing both "Interface" and "Output Device" to the available ones (hw:0 HDA Intel, hw:0,0 CONEXANT Analog, hw:1 HD-Audio Generic) but still, only other output I can redirect to is the HDMI one. Maybe it is bound to the Intel audio device and there can't be done anything... Anyways, unless you have another suggestion, thanks for trying to help smile

Offline

Board footer

Powered by FluxBB