Bugzilla – Bug 8318
Fix Line In plugin
Last modified: 2009-09-08 09:18:21 UTC
It would be great if Boom could mix the input from line in with its normal (squeezecenter etc) output. This would allow the Boom to function as PC speakers whilst still playing music via SqueezeCenter/SqueezeNetwork. This would probably also require a line in volume setting to be added to SqueezeCenter to control the mix level. My boom is currently sitting just beneath my widescreen monitor. It looks great there, but the look is spoiled by the rubbish PC speakers sat either side of it. It would be great to take them out of the equation! (Caleb suggested this on the forums a while back and I thought it was such a good idea that it should be captured to prevent it being forgotten.)
Also good for Karaoke! Caleb: Is this in your plan for 7.2?
This ability is already there in the DSP. It just needs to be added to the firmware. We need some higher level interface functions in the firmware and/or some slimproto commands.
Caleb: can you add the hooks to allow this setting via slimproto, then the bug can be moved to the server?
That's already done. I sent the docs out to erland, kdf and felix. We need to talk about the right way to do it, but for now, it's simple slimproto bdac stuff.
(In reply to comment #1) > Also good for Karaoke! > Will the display show the words?
Line in can be selected from SC now (bug 8701). So I guess it's just a matter of playing music _and_ enabling line in at the same time.
Don't forget the awful singing filter! Why oh why would we want karaoke??? ;-)
I had a conversation with Caleb a little while back and we discussed the idea of always passing the line-in through. I.e. Just leave it mixing all the time. What do you guys think of this? I could see that plugging in would pause the current online playback, but assuming the user has control over the source, it would be a pretty simple model and would require the user to do nothing to switch back and forth _and_ karaoke would just work. Reactions?
Works for me.
I could see that work like this. I believe this is now doable from SC. Please let me know if anything else is needed in fw.
...and what's left to do from SC's side?
following up on a phone discussion that I just had with Dean: if we move to "always pass through", the Line In setting should be removed from all UIs. For now, I'm going to move the Line In item from home -> extras menu on the controller. At some later date we may want to add a setting for Line In Level, but that's a separate topic.
But, we still need a line-in volume setting, right? So you can independantly adjust the main volume vs. line-in volume. This setting is already in the DSP code -- just needs a bit of software to make work.
I must be the only one who's got no clue what this is all about. If somebody can tell me what there is to do, feel free to tell me. But for now I rather unassign this bug to get someone else's eyes on it.
The idea is pretty simple: 1. Get rid of the "Line In" menu choice. 2. When you plug in something to the LINE IN plug in the back of boom, stop playing whatever's playing 3. Always mix the input from the LINE IN plug to the output. This means that the user doesn't have to do anything via the remote or front panel to hear whatever is plugged into the line in, it's always on. The user can start/stop playback from the network as usual and/or play audio from the line in from their iPod, CD player, computer output, whatever. Extra credit for a new line in level setting that lets the user adjust the line input gain, but generally speaking the user can use the regular volume control on the Boom or the volume control on the connected device. We could also get rid of the Line In choice in the setup menu, since the line in would always be mixed in. Less is more. CC'ing Dylan as this may affect the user documentation. Michael: Can handle the plugin? Felix: Can you remove the line in choice on the settings menu? (Volume control should continue to work to adjust the line in volume).
There is a potential problem with this idea. If there is literally no way to turn off line in, if there is a low level noise coming in the line-in, it will be there all the time, and be really annoying. I'd go crazy if I was unable to turn it off at all. Additionally, I'd have to suspect there is something wrong with my boom. This isn't super common -- a line-in is plugged in AND you don't want to listen to whats on it. But it's a possibility.
> Michael: Can handle the plugin? No problem removing the menu :-). Felix - how is the event of plugging in a device triggered in SC?
Caleb: Can you explain a situation where this would happen? Bad device? Ground Loop?
example 1: line in from mp3 player and someone turns it on accidentally or not-so-accidentally. example 2: device is plugged into line in, but while boom is playing something loudly, the line plug is pulled. This often results in loud pops. example 3: line in lead is left plugged in, but nothing at other end. Any static or radio interference will be mixed in. example 4: kid plugs in ipod and leaves it. critical listener later finds classical collection sounding like crap and explodes into the forum about what crappy sound his $500 (est?) device produces after changing nothing. what could possibly go wrong? :)
Dean/Caleb - we need a quick decision (very quick - Friday is a public holiday over here ;-)). I'll put this low in my priority list until we're sure we really want to do this.
Michael: AFAIK a connected player regularly sends STAT events which contain the line in/out plugged in status.
volume control will still work and we will add a Line in gain. So you guys think this is acceptable?
Caleb and I went over the risks associated with leaving the Line In on all the time as the only behavior and it's too risky to change at this time. But the Line In functionality isn't quite done yet. Here's what we need: 1. Line In should only appear in the Home menu when there is something plugged into the Line In jack. 2. When you plug in something to the line in jack, network playback should stop, Line In should be placed on the playlist. 3. If you choose to play something from the network, the Line In should be turned off and the network audio should be heard. 4. Navigating back into the Line In item on the home menu should switch back to Line In. (When inside this menu, turning the knob should adjust volume.) 5. Unplugging the cable should remove the Line In item from the home menu and clear the playlist. 6. Add a new setting as Settings/Audio/Line In. It should have two sub-items: - Level - This is a bar adjusting the line in gain. It should default to 50%, which is the current gain in the software. 100% should be 12dB up, and down to zero, which is off. (Michael: Take a first pass at the values, Caleb will tweak and verify). - Always On - This is a checkbox that turns on the line input all the time, to let users who want to mix in the line in all the time (for Karaoke, PC speakers, or lazy iPod users.) Sorry for the delay in this, I think we've got a solid plan for ship.
> 1. Line In should only appear in the Home menu when there is something plugged > into the Line In jack. Felix/Caleb - may I ask for some more detail on how to detect this event? Felix mentioned a STAT message: is this sent out? Would I have to poll it? Could you point me to some code which would help here? > 6. Add a new setting as Settings/Audio/Line In. It should have two sub-items: > > - Level - This is a bar adjusting the line in gain. It should default to > 50%, which is the current gain in the software. 100% should be 12dB up, and > down to zero, which is off. (Michael: Take a first pass at the values, Caleb > will tweak and verify). How should these values be represented server side? 0-100?
>How should these values be represented server side? 0-100? Yes, 0-100.
(In reply to comment #23) > 5. Unplugging the cable should remove the Line In item from the home menu and > clear the playlist. clearing the playlist if it's still playing line in. Perhaps if network play is ongoing then removing the cable should just quietly remove the line-in option without interrupting playback?
Good point, the playlist should only be cleared if it's playing line in.
Michael: About the STAT event. The player sends it periodically to SC. I don't know anything about how it is further processed within SC. I guess the values are stored somewhere and you probably need to poll. As an example you could check the Settings-Status page (or Player-Basic Settings) where 'Wireless Signal Strength' and in case of a transporter also 'Voltage' is reported. I reused the voltage field for Boom to report plugged in status of line in and line out.
Added a slimproto message 'LIOS' reporting the same bitfield as in the 'STAT' event as soon as the state of line in or out changes. Will be in fw 23
QA to verify this functions according to Page 22 of the BOOM Users Guide once FW is ready.
It looks like the problem I had yesterday (Version: 7.2 - 22374 @ Tue Aug 5 01:05:27 PDT 2008) with the Line In menu will probably be cured before release but just to be sure.... I was using the Boom remote to control the player. I selected Line In and my Boom stopped playing music. I didn't know how to get the music back and it took a while to realise I just had to start playing something new. I expected to find a Line In *off* setting under the Line In menu setting. I felt as though selecting Line In *off* should continue playing the currently selected playlist from where it left off when I selected Line In.
change 22447 - added alwaysOn/level prefs (web UI only so far) Caleb - I've created a stub which is called when the level is defined (Boom::setLineInLevel()). But it currently doesn't do anything - feel free to fill in the gap. It will receive a new value of 0-100. Dean/Caleb/all: I wasn't sure about the alwaysOn when no device is connected. Doesn't make sense in this circumstance, does it? The current code will turn off linein even if alwaysOn is set, when there's nothing plugged in.
Also - I've checked in some new strings (placeholders) for the Line In settings page. Please review them and update if possible.
I'm not sure where to put the new additional options. Settings/Audio? Sub menu under the Line In menu option? Extras? Settings/Audio would require even more leaking from the plugin into the main code than there is already.
change 22465 - moving Line In settings to Audio settings in player/web UI. Ben - I tried to add them to Jive too, but failed miserably. Here's the code I tried to use (in Control/Jive.pm): push @menu, { text => $client->string("LINE_IN_ALWAYS_ON"), id => 'settingsLineInAlwaysOn', node => 'settingsAudio', weight => 80, choiceStrings => [ ($client->string("ON"), $client->string("OFF")) ], selectedIndex => $prefs->client($client)->get('lineInAlwaysOn') ? 1 : 0, actions => { do => { choices => [ { cmd => [ 'pref', 'lineInAlwaysOn', 1 ], player => 0 }, { cmd => [ 'pref', 'lineInAlwaysOn', 0 ], player => 0 } ] }, }, window => { titleStyle => 'settings' }, }; Level would need something like the volume setting found in other places, too (0-100). Feel free to shove this bug back to me... When you're done :-). Thanks! And all the others - please revise the strings I've added. Thanks!
Dean notes line in should show up on the home menu if something is plugged in, and the controller should follow the player UI in this behavior.
"Dean notes line in should show up on the home menu if something is plugged in, and the controller should follow the player UI in this behavior." ...except the playerUI does not follow this behavior, at least not that I've been able to make it. I plugged something into Line In and the only thing that happened is that my playlist stop playing and was cleared. Line In settings (Line In Level and Line In Always On) seem to be always homed in Settings->Audio, just below the Line Out menu. Could I get some feedback on how this is actually supposed to work in the playerUI, so I can try to mirror it in the controllerUI?
> Could I get some feedback on how this is actually supposed to work in the > playerUI, so I can try to mirror it in the controllerUI? It should indeed show up in the main menu. Do you have the LineIn plugin installed and enabled? Does it switch to play from LineIn when plugging it in? Or did you accidentally use head-out? ;-)
Fixed my part in ip3k r4724 and SC 7.2 r22562. It now plays line in and squeezebox audio simultaneously. Is there anything else that needs to be done on this one?
Caleb- bug needs to stay open pending controllerUI support for this plugin, which I'm working on now.
Caleb - please see my comment 32: there's now a control to set line in level, but no code which actually changes this level. I've opened a new bug 9128 for this.
Ha! See my comment 39: It's fixed already. :-)
> Fixed my part in ip3k r4724 and SC 7.2 r22562. > > It now plays line in and squeezebox audio simultaneously. Didn't this work before, but was optional? Is it now always on? According to the "spec" in comment 23, point 6 this should not be a forced always on, but optional (as it was already).
It didn't do proper volume control in the DSP for line in. Now it uses the real volume control for non-audible volume switching. (previsouly it was just a gain setting, rather than a real volume control, which would produce clicks when changing volume). -caleb
change 22598 delivers controllerUI support Description: Full LineIn plugin support in controllerUI Line In item appears in home menu when something is plugged into the line in jack Line In item is removed from home menu when something is removed from the line in jack Settings->Audio->Line In Level added. Uses a slider widget to set volume and a showBriefly for UI feedback on the level that's been set Settings->Audio->Line In Always On added. This is delivered as a "choice" item
Verified to be working in 7.2 - 22900, very cool.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.