Author Topic: Sound Input And Output And Debian Eabi  (Read 14392 times)

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« on: April 10, 2008, 12:25:54 pm »
I am very happy  with the Debian 2.6.24-3-yonggun on the C1000.

But i have a sound problem.
When i plug in a stereo-headphone it causes a system crash. When i reboot with the stereo-headphone already plugged the system boots without problems. So every time, if i want to use a stereo-headphone, i have to halt the system first  :-(

Other problem: I am trying to recieve weather-faxes via the soundcard and a microphone on the zaurus. The debian hamradio-software installs without problems. But i can´t get the alsamixer ready to recieve signals (only noise).

Any suggestions?
thanks
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #1 on: April 10, 2008, 05:08:20 pm »
does it crash if zaurus is suspended?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #2 on: April 11, 2008, 04:41:17 am »
Quote from: speculatrix
does it crash if zaurus is suspended?
No, suspend is working.

Maybe the C1000 needs a 4-pole plug.
The 3-pole Headphone plug may shorten the remote-to-ground-pin (3-4) because -
if i unplug the Headphone i get an error message about a remote-control. Had no problems with other Distributions (pdaXrom, cacko, OZ ...) Maybe a Debian Problem
 
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #3 on: April 11, 2008, 09:26:05 am »
I believe the zaurus uses one pin for the remote control, one is dual headphone or microphone set by the driver when you want to record sound, the other is analogue out.

depending on the kernel and driver, you may or may not get remote control signals.

AIUI, the remote control is simply a CR circuit whose time constant is measured by the kernel. Sharp in their wisdom used the same technique across a range of zauruses, but they changed the RC values so that they're not all interchangeable... d'oh!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #4 on: April 11, 2008, 09:29:43 am »
Quote from: maemorandum
Other problem: I am trying to recieve weather-faxes via the soundcard and a microphone on the zaurus. The debian hamradio-software installs without problems. But i can´t get the alsamixer ready to recieve signals (only noise).

that sounds like a very interesting project; ensure you connect the audio input to the correct ring on the audio jack. use the zaurus sound recorder utility to verify if it's detecting sound; being a microphone you need quite a small signal, probably less than 100mV otherwise you'll overload the input; use a couple of resistors as an attenuator if needed, let me know if you want help calculating the values, but at a guess a log potentiometer of about 1K with the wiper connected to the Z should be about right.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #5 on: April 11, 2008, 10:43:39 am »
Quote from: speculatrix
Quote from: maemorandum
Other problem: I am trying to recieve weather-faxes via the soundcard and a microphone on the zaurus. The debian hamradio-software installs without problems. But i can´t get the alsamixer ready to recieve signals (only noise).

that sounds like a very interesting project; ensure you connect the audio input to the correct ring on the audio jack. use the zaurus sound recorder utility to verify if it's detecting sound; being a microphone you need quite a small signal, probably less than 100mV otherwise you'll overload the input; use a couple of resistors as an attenuator if needed, let me know if you want help calculating the values, but at a guess a log potentiometer of about 1K with the wiper connected to the Z should be about right.

Thank you for your answer.
I have already connected a shortwave-reciever (while rebooting, see freezing-problem above) to the C1000-headphone jack. Then i started a clean weather-fax-sound. With 1000 settings in alsamixer and xoscope i finally could recognize a signal at /dev/dsp. But i could not get a duplicated control-sound out to the speaker. Anyway hamfax and acfax could not decode any tone   Looking at the noise, they produce, i guess the tone-frequency changed to half and white-noise is lying overt the signal. I tried to recieve a signal with a microphone - the same effect. I could not get any sound-recording-application working on EABI, so i have no idea what happens with the signal..

With a reciever, the ZAURUS could be the smalles weather-fax and satellite-fax reciever in the world.
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #6 on: April 11, 2008, 01:06:27 pm »
Quote from: maemorandum
clean weather-fax-sound. With 1000 settings in alsamixer and xoscope i finally could recognize a signal at /dev/dsp. But i could not get a

I imagine there's going to be some leakage between headphone outputs and microphone input so if you're not triggering the driver into putting it into input mode, you're going to get *something*.

BTW, the zaurus's sound chip seems to be only capable of 48kHz sampling; on playback if you feed it a different rate the driver has to resample which can be quite slow (e.g. movie playback is very adversely affected, or at least it used to be).
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #7 on: April 11, 2008, 01:49:02 pm »
Quote from: maemorandum
Quote from: speculatrix
does it crash if zaurus is suspended?
No, suspend is working.

sorry, what I meant was, if the zaurus is suspended and you remove or insert the plug, does the zaurus crash or can you resume operation? that is, if there's no driver triggering a remote-control event because the kernel's sleeping, it might give a clue as to where the fault lies.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #8 on: April 11, 2008, 05:44:12 pm »
Quote from: speculatrix
does it crash if zaurus is suspended?

Sorry i missunderstood the question.
YES! If i plug in any headphone while the C1000 is in suspend-mode, the C1000 will not wake up. Freeeze. I have to do a reset.
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #9 on: April 12, 2008, 03:45:03 pm »
Quote from: maemorandum
Quote from: speculatrix
does it crash if zaurus is suspended?

Sorry i missunderstood the question.
YES! If i plug in any headphone while the C1000 is in suspend-mode, the C1000 will not wake up. Freeeze. I have to do a reset.

hmm, that's very interesting... it implies that the kernel gets an interrupt even when the Z is asleep, and that it crashes the kernel. I wonder if there's a command you can feed the Z via the /proc or /dev devices? It's quite a nuisance I grant you!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #10 on: April 13, 2008, 06:34:31 am »
Quote from: speculatrix
Quote from: maemorandum
clean weather-fax-sound. With 1000 settings in alsamixer and xoscope i finally could recognize a signal at /dev/dsp. But i could not get a

I imagine there's going to be some leakage between headphone outputs and microphone input so if you're not triggering the driver into putting it into input mode, you're going to get *something*.

BTW, the zaurus's sound chip seems to be only capable of 48kHz sampling; on playback if you feed it a different rate the driver has to resample which can be quite slow (e.g. movie playback is very adversely affected, or at least it used to be).

I solved 50% of my problem  . Was no debian fault. The sound electronic of my zaurus SL-C1000 might be damaged. I tested it on original sharp rom - headphone works, speaker is dead.
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #11 on: April 13, 2008, 10:46:58 am »
Quote from: maemorandum
Quote from: speculatrix
Quote from: maemorandum
clean weather-fax-sound. With 1000 settings in alsamixer and xoscope i finally could recognize a signal at /dev/dsp. But i could not get a

I imagine there's going to be some leakage between headphone outputs and microphone input so if you're not triggering the driver into putting it into input mode, you're going to get *something*.

BTW, the zaurus's sound chip seems to be only capable of 48kHz sampling; on playback if you feed it a different rate the driver has to resample which can be quite slow (e.g. movie playback is very adversely affected, or at least it used to be).

I solved 50% of my problem  . Was no debian fault. The sound electronic of my zaurus SL-C1000 might be damaged. I tested it on original sharp rom - headphone works, speaker is dead.
Your speaker problem could be already discussed. The contacts can get dirty. The speaker contacts are just a "friction" type contact.
When the keyboard part of the clamshell is separated, the speaker contacts also separate from their associated connections.
There is a discussion in the cxx00 model forums somewhere.
When in Cacko, turn up the volume all the way and squeeze the keyboard area near the menu or home button, this is where the speaker is located and it will sometimes make contact.
My SL-C3100 has done this for about a year now. I'll look for the thread I mentioned above. Here are 2 threads referring this problem.
https://www.oesf.org/forum/index.php?showto...&hl=speaker
https://www.oesf.org/forum/index.php?showtopic=20986&st
« Last Edit: April 13, 2008, 10:56:37 am by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #12 on: April 21, 2008, 05:17:36 am »
Thank you for your informative advice Jon_J, but i had no luck with it.

Anyway, i got a SL-C3200 this weekend. I tested the debian distribution and had no problems pluggin in the headphone.  So, a broken C1000 was the reason, definitely  

O.K. does anyone know which parameters i have to set when using the alsamixer? The input-device might be a headphone, with one earphone as microphone for the beginning. And i need a clean mono-signal at the /dev/dsp.

Any experiences?
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Sound Input And Output And Debian Eabi
« Reply #13 on: April 21, 2008, 07:11:32 am »
I was reading recently that the simply mechanical cut-over switches in headphone sockets can get dirty and don't operate properly. when the plug is inserted it contacts the input terminals and lifts the contacts off the output contacts thus disconnecting the speaker. dirt can get trapped.

apparently a cotton bud, with the end cut off to leave a small ribbon of cotton attached, dampened very slighy, is quite effective at removing trapped dirt.

the trick is to leave just sufficient cotton on the bud and only slightly dampen otherwise it can pull off.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

maemorandum

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Sound Input And Output And Debian Eabi
« Reply #14 on: May 02, 2008, 08:51:56 am »
Thank you speculatrix. I had no luck with it, so i sold the C1000 to work on a C3200.

So, whats the fact? There are many settings and switches in the alsamixer control-panel. Too many for me.
I found out, that pluggin in a headphone causes the alsacontrol to switch the "jack-function" to "headphones".
"Speaker function" and "mic boost" should be on higher level. O.K. that´s not very much engeneering. But what about the other cryptic settings?
For example, what are the settings to get a clean voice-signal from the left headphone used as microphone"?.
Putting all controls to the highest levels - like it was posted in earlier discussions - might mot be a real solution.

The alsamixer-controls:

Haedphone 0 <--------> 100
Haedphone Playback ZC (00)
Bass0 <--------> 100
Bass Boost (Linear Control, Adaptive Boost)
Bass Filter (200Hz, 130Hz @ 48kHz)
Treble 0 <--------> 100
Treble Cut-off (4kHz, 8khz)
PCM 0 <--------> 100
Mic Boost 0 <--------> 100
Mono 0 <--------> 100
Mono Mixer Left (0ff) (MM)
Mono Mixer Left Bypass (Off) (MM)
Mono Mixer Right Bypass (Off) (MM)
Mono Mixer Right Playback Switch (Off) (MM)
Mono Playback ZC (Off) (MM)
Playback 6dB Attenuate (Off) (MM)
Playback De-emphasis (48Khz, 44,1kHz, 32kHz, None)
Playback Invert (off) (MM)
Capture 0 <--------> 100
Capture 6dB Attenuate (Off) (MM)
Capture Polarity (Normal, L Invert, R Invert, L+R Invert))
Capture ZC (Off) (MM)
3D (off) 0 <--------> 100
3D Lower Cut-off (200Hz, 500Hz)
3D Mode (Capture, Playback)
3D Upper Cut-off (1,5kHz, 2,2kHz)
ALC Capture Attack Time 0 <--------> 100
ALC Capture Decay Time 0 <--------> 100
ALC Capture Function (Off, Right, Left, Stereo)
ALC Capture Hold Time 0 <--------> 100
ALC Capture MAX 0 <--------> 100
ALC Capture NG (Off) (MM)
ALC Capture NG Threshold 0 <--------> 100
ALC Capture NG Type (1,5kHz, 2,2kHz)
ALC Capture Target 0 <--------> 100
ALC Capture ZC (Off) (MM)
Bypass Left 0 <--------> 100
Bypass Mono 0 <--------> 100
Bypass Right 0 <--------> 100
Differential Mux (Line1, Line2)
Jack Function (Off, Headset, Line, Mic, Headphone)
Left ADC 0 <--------> 100
Left ADC Mux (Stereo, Mono-Left, Mono-Right, Digital-Mono)
Left Line Mux (Line 1, Line 2 Line 3, PGA, Differential)
Left Mixer (00)
Left Mixer Left Bypass (00)
Left Mixer Right Bypass (00)
Left Mixer Right Playback Switch (00)
Left PGA Mux (Line 1, Line 2, Line 3, Differential)
Out3 Mux (VREF, ROUT1 + Vol, MonoOut, ROUT1)
Right ADC 0 <--------> 100
Right ADC Mux (Stereo, Mono-Left, Mono-Right, Digital-Mono)
Right Line Mux (Line 1, Line 2, Line 3, PGA, Differential)
Right Mixer (00)
Right Mixer Left Bypass (Off) (MM)
Right Mixer Left Playback Switch (00)
Right Mixer Right Bypass (00)
Right PGA Mux (Line 1, Line2, Line 3, Differential)
Right Speaker Playback invert (00)
Speaker   0 <--------> 100
Speaker Function (On, Off)
Speaker Playback ZC (00)
ZC Timeout (Off) MM

So, is there anyone having experiences in setting the right parameters to get voip, sound-recording or hamradio-applications running on Debian? What are the right settings and what can be forgettable?

Thank you.
« Last Edit: May 02, 2008, 08:52:39 am by maemorandum »
SL-C3200 with opened 2nd CF-Slot, Debian EABI 2.6.23.9-yonggun on 2 GB High-Speed-CF
SL-C1000, Cacko-ROM

ASUS WL-110, hacked with external SMA Antenna Jack
AmbiComWL 1100C-CF, Buffalo Airstation-CF