When you are heavily obstructed and someone tries to hide from you, can you find out his location by hearing? What is the range of your passive perception based on hearing?
A Perception check can rely on any sense, and your DM decides what is appropriate for the situation.
Perception represents how perceptive a character is in all their senses, not just sight or hearing (from the SRD):
Perception. Your Wisdom (Perception) check lets you spot, hear, or otherwise detect the presence of something. It measures your general awareness of your surroundings and the keenness of your senses.
Which sense is used with your passive Perception score or when making a Perception check depends on the sense being used. Even though that will usually be vision (often enough that people tend to assume Perception is always about vision), the situation may call for the use of another sense. You may have advantage, disadvantage, or neither on your passive Perception score or Perception check for a particular sense.
Consider the following mastiff feature to see an example where this differentiation appears in the rules (see Player's Handbook page 307, and note for sake of contrast that many other beasts in the PHB, SRD, and Monster Manual include similar Keen [Sense] features):
Keen Hearing and Smell. The mastiff has advantage on Wisdom (Perception) checks that rely on hearing or smell.
This makes sense because dogs have excellent hearing and sense of smell but do not have very good eyesight. Conversely, humans have exceptional eyesight but only average hearing and very poor sense of smell. In the scenario you've given, since heavy obstruction generally completely blocks sight, you may try to use your hearing to locate a creature behind the obstruction, but the DM will have to determine whether the situation is favorable or unfavorable.
Since humanoids are much less adept at hearing than sight, if the DM decides that you can or will make a Perception check based on hearing, they might require you to make the check with disadvantage if they think circumstances are disadvantageous for you to be able to identify the location of the creature by hearing. And if you were to try to identify the location of a creature by smelling their odor or identify the location of a humanoid by sniffing their cologne as it drifts by, the DM would almost definitely rule you to be at a disadvantage.
So, the short answer to your question is: your passive Perception score is as high as the DM rules it to be for a particular scenario using a particular sense. By default, your Passive perception score is 10 + your Perception modifier, but if you have advantage in the case of a particular sense then it is increased by +5, or if you have disadvantage then it is decreased by -5, and your DM adjudicates what is appropriate.
For example, if your Perception modifier is +3, then you generally have passive Perception 13, but you might have have passive Perception 18 if the DM believes that the situation is in your favor for a particular sense or 8 if they believe you are seriously limited in your ability to succeed in perceiving something with that particular sense.
Note that Perception can not allow you to perceive something it is impossible to perceive. If a creature is hidden from view, completely silent, and without odor or other telltale signs such as shadows affecting the area, the DM may rule that it is completely impossible for you to detect them. In that case, a Perception check is not called for because you only roll an ability check when there is a possibility of success, and you would automatically fail on passive Perception as well.
Perception. Your Wisdom (Perception) check lets you spot, hear, or otherwise detect the presence of something. It measures your general awareness of your surroundings and the keenness of your senses. (PHB p.178)
A heavily obscured area— such as darkness, opaque fog, or dense foliage— blocks vision entirely. A heavily obscured area doesn’t blind you, but you are effectively blinded when you try to see something obscured by it. (see appendix A). (PHB p.183 - errata)
A blinded creature can't see and automatically fails any ability check that requires sight
Attack rolls against the creature have advantage and the creature's attack rolls have disadvantage. (PHB p.299)
When you take the Hide action, you make a Dexterity (Stealth) check in an attempt to hide, following the rules in chapter 7 for hiding. If you succeed, you gain certain benefits, as described in the “Unseen Attackers and Targets” section later in this chapter.
What it means
In general, unless a creature is hiding (i.e. has taken the Hide action and made a Dexterity (stealth) check - which can happen before the encounter), everyone knows where they are even if they cannot be seen!
If they are hidden then creatures whose passive Wisdom (Perception) beats their Dexterity (Stealth) check know where they are even if they cannot be seen and everyone else doesn't. This can lead to a children's pantomime routine - "Look behind you!" or "He's in the wardrobe!" Creature's whose passive Wisdom (Perception) is too low can take an action to Search and make an active Wisdom (Perception) check which is (hopefully) better.
Now introduce the (effectively) Blinded condition. If perceiving the hidden creature "requires sight" then they cannot be found. However, only creatures that are perfectly silent, don't have any odour, cannot be touched (or tasted) require sight to be found - ghosts spring to mind.
Of course, it is perfectly sensible to impose disadvantage on the Wisdom (Perception) check to perceive a creature that you cannot see (for whatever reason) if your primary means of locating them would otherwise be by sight (like it is for PC races). Remember that disadvantage on a passive check gives a -5 penalty and means roll two dice and take the worst on an active check.
Make one Perception check, but decide what this means for each sense separately
All three core rule books have examples of Perception checks relying on a particular sense.
In a lightly obscured area… creatures have disadvantage on Wisdom (Perception) checks that rely on sight. [PHB p 183]
A strong wind imposes disadvantage on… Wisdom (Perception) checks that rely on hearing. [DMG p 110]
The carrion crawler has advantage on Wisdom (Perception) checks that rely on smell. [MM p 37]
So it is clear the designers intended Perception to be assessed separately for separate senses at least some of the time. But what is not clear is how the term 'rely on' should be interpreted:
- Must it be impossible to use any other sense? (a strict reading)
- Or can you treat a Perception check as relying on two or more senses at the same time? (a looser reading)
If you assume the stricter reading, then all of the rules quoted above become highly circumstantial corner cases. This is an approach that the rest of the rules explicitly eschew. So that leaves us with a looser interpretation more in keeping with the broad brush of the 5e rules as a whole: that a Perception check can rely on two or more senses at the same time. But how do you apply this interpretation?
The simplest thing to do is analyse a Perception check as relying on each sense separately: analyse it as relying on sight; analyse it as relying on hearing; analyse it as relying on smell, and so on. Then combine the results of these analyses to build up a picture of what exactly can be perceived.
Quick digression: 5e has little to say about smell and nothing to say about touch
Smell is only mentioned in the context of the Keen Smell trait, which gives advantage on Perception checks relying on smell. If those creatures have advantage, which creatures, if any, get to make a straight check (one without advantage)? I would say all of them. However, for most of the rest of this answer, I'll put smell to one side and ignore it.
Make one set of rolls (for advantage, standard and disadvantage)
If you are analysing one sense at a time, different factors will weigh on each analysis (otherwise what's the point of analysing each sense separately?). A check relying on sight will take account of light obscurement; a check relying on hearing will take account of ambient noise levels; a check relying on smell will take account of an overwhelming stench. In other words depending on the sense, advantage or disadvantage may apply. Because of this it's worth rolling three dice whenever you make an active Perception check, so you know the advantaged, straight and disadvantaged results immediately. Rolling them afresh for each sense gives more chances to succeed, and is akin to the 'every player rolls' problem.
Detecting a creature's presence, knowing its exact position, and being able to target it
OK, so your Perception check has beaten a hiding creature's Stealth check. What does this tell you?
Firstly, you've detected the presence of a hiding creature: you can't be surprised.
Secondly, you perceive it in its exact position (its space on the combat grid if you're using one) and it's no longer hidden from you: you can unerringly target its space. This is not stated explicitly in RAW but can, at a push be inferred from them, and seems to be the general consensus here and in other fora.
Thirdly - if you managed to detect it with your Perception check relying on sight - you can see it, so you can target the creature itself.
That last point is important. Perceiving a creature by sight gives you a big benefit over perceiving it by hearing or some other sense. If you can't see it, you suffer the consequences of the Unseen Attackers and Targets rules on p 194 of the PHB:
When you attack a target that you can’t see, you have disadvantage on the attack roll. This is true whether you’re guessing the target’s location or you’re targeting a creature you can hear but not see. If the target isn’t in the location you targeted, you automatically miss, but the DM typically just says that the attack missed, not whether you guessed the target’s location correctly.
When a creature can’t see you, you have advantage on attack rolls against it.
If you are hidden—both unseen and unheard—when you make an attack, you give away your location when the attack hits or misses.
For this reason, do not impose disadvantage on Perception checks that rely on hearing as a matter of course. This is in contrast to @Bloodcinder and @Dale M who both suggest this as a possibility. Furthermore there is nothing in RAW to suggest this approach.
Instead, treat each check according to its merits. Even if the check succeeds, it is far less helpful than one relying on sight, so it isn't necessary to penalise it further. For example, my Perception check to detect a rogue hiding in shadows suffers disadvantage when it relies on sight, but is made as normal when it relies on hearing. So I might have a reasonable chance of hearing the hiding rogue and detecting her exact position, but a less good chance of seeing her in that position.
Another quick digression, this time about special senses
A careful reading of the rules draws a similar distinction between blindsight and the ranger's feral senses on the one hand, which allow you to 'see' the target itself, and tremorsense, web sense and the rogue's blindsense on the other hand, which merely allow you to determine its exact position while you remain effectively blind to the creature itself.
Restricting the range of senses
To me it's ridiculous that, from 300 feet away, I can hear your exact position just as precisely as I can see it. And it's equally ridiculous that, from 30 feet away, I can smell your exact position just as precisely as I can hear it. For this reason I have a house rule that you can detect a creature's exact position by hearing up to 30 feet away, and by smell up to 10 feet away. Beyond these ranges you can detect only a creature's general whereabouts - how precise that is depends on how well your Perception check beats its Stealth check. I also have an absolute limit to the range of each sense, but that's for another discussion.
Both, always with full modifier
Perception. Your Wisdom (Perception) check lets you spot, hear, or otherwise detect the presence of something. It measures your general awareness of your surroundings and the keenness of your senses. For example, you might try to hear a conversation through a closed door, eavesdrop under an open window, or hear monsters moving stealthily in the forest. Or you might try to spot things that are obscured or easy to miss, whether they are orcs lying in ambush on a road, thugs hiding in the shadows of an alley, or candlelight under a closed secret door.
You can use your hearing even if you are unable to see the other creature, this is with your full perception modifier. Being unable to be seen clearly by the other creature (Total Cover or Heavily Obscured) is a requirement to be able to Hide in the first place.
I recommend this mini guide on Stealth to understand that mechanic better, since the PHB isn't exactly clear at first glance.