# How to: Send audio from speaker to earplugs in Dell Inspiron 15r se 7520 + freebsd 12.1



## Deleted member 58914 (Oct 25, 2019)

To output audio to the wired headphones, add this to /etc/sysctl.conf:

```
hw.snd.default_unit=1
```

To return audio to the laptop speakers, change "1" to "0":

```
hw.snd.default_unit=0
```

This is the simple way for a Dell Inspiron 15r se 7520 laptop, but there is a way to do this switch automatically if your search on the web.


----------



## rigoletto@ (Oct 25, 2019)

Not correct!

`hw.snd.default_unit` change the default sound card and the number may be anything.

For instance, this is the output of mine /dev/sndstat:


```
Installed devices:
pcm0: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC892 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC892 (Front Analog)> (play/rec) default
pcm6: <Realtek ALC892 (Rear Digital)> (play)
pcm7: <Realtek ALC892 (Onboard Digital)> (play)
No devices installed from userspace.
```

The switch to headphones should happen automatically unless the pins of your card were not sorted out yet, but it can be made using devices hints; however this is a bit annoying to setup.


----------



## Deleted member 58914 (Oct 25, 2019)

Ah, I see! Thanks for taking the time to tell me this rigoletto@, I will change the title and description of this thread to say it is for a Dell Inspiron laptop only.


----------



## k.jacker (Oct 25, 2019)

Even between different models of Dell Inspiron laptops, there will be huge differences.
If it should make any sense at all, you must provide the exact model name.

...and by the way, the FreeBSD Forums have a dedicated section for Howtos: Howtos and FAQs (Moderated)


----------



## Deleted member 58914 (Oct 25, 2019)

I see your point, and thanks for the 2 hints. Isn't "dell inspiron 15r se 7520" enough information? If not I can search the manual for more data if it have it.

As for the How to area, I at first posted there; but there is an edit limit at that forum area. I talked with an admin and he said since I like to update my posts with new information as soon as I have them, it was better here to avoid triggering the "awaiting moderation" notification many times for the admins and moderators at the "How to" area. Here I can edit at will without bothering someone.


----------



## toorski (Oct 25, 2019)

となりの吸血鬼さん said:


> This is the simple way for a Dell Inspiron 15r se 7520 laptop, but there is a way to do this switch automatically if your search on the web.


Same applies to Dell-T3500, Dell-T5500 - my 2 FreeBSD workstations. I dont' know about my Dell-4500 and Dell-4600 laptops. I don't need or use sound in my laptops - one is a router and the other TCP/IP server 



rigoletto@ said:


> The switch to headphones should happen automatically unless the pins of your card were not sorted out yet, but it can be made using devices hints; however this is a bit annoying to setup.



No automagic switching in my case either, so instead of dealing with hints I do as the same as the OP - plain and simple.


----------



## k.jacker (Oct 25, 2019)

となりの吸血鬼さん said:


> dell inspiron 15r se 7520


Yes, that should be enough.

Personally, I don't think it's a good idea to post howto's anywhere but where they belong.
FreeBSD is famous for it's structure, so that should be reflected in the forums, IMO.
Anyway, do how you like if the mods are ok with it, but be nice and mark all your howtos accordingly in the thread title (you did well so far ).
One last thing to keep in mind... not every note you take for yourself, qualifies as a howto. Think if all of us would post every single note we take.


----------



## Deleted member 58914 (Oct 25, 2019)

Hum, you have got a point on the posting each bit of information I find useful. I just think it is hard to choose what people might find useful or not regarding any given small information.

Ah, glad I got the notebook information right to detail more this post.

I also wanted to post at the how tos, but the admins and mods thought it was better in my case to post outside the "How to" area. One of the things I admired in freebsd indeed was how things are so organized.


----------



## Deleted member 58914 (Oct 25, 2019)

You are lucky then toorski, for not needing to use sound at your laptops. =D Automatic switching would be ideal, but the alternative I had shown is simpler I think when you have not time available for that.


----------

